Hi guys, does this script look okay? The ai assistant says im not handling the characterAdded evernt correctly, but its not explaining it well
local players = game:GetService("Players")
players.PlayerAdded:Connect(function(player)
print(player)
task.wait(3)
if player.CharacterAdded then
local humanoid = player.Character:FindFirstChildWhichIsA("Humanoid")
task.wait(3)
if humanoid.Health >= 50 then
print("You are Healthy!")
else
print("Get to the doctor. Bucko!")
end
end
end)