Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Why does my script to damage the player 5 seconds after they spawn not work?

game.Players.PlayerAdded:Connect(function(plr)
wait(5)
print(plr.Character.Humanoid)
local hum = plr.Charcater.Humanoid
hum.Health = hum.Health - 99
end)

I am using a server script in the serverscriptservice.

2 comments

0

Its plr.Character.Humanoid not plr.Charcater lol

0

SO THATS WHY NONE OF MY SCRIPTS WORK>>>>>>>>>>!!!!!!!!!!!!!(PU^&&^(&^^&(JKMJHUYKMHJNMGYBHGJNTYBR

1 answer

✓ Accepted answer

You've miss spelt 'Character' with 'Charcater'.

game.Players.PlayerAdded:Connect(function(plr)
	wait(5)
	print(plr.Character.Humanoid)
	local hum = plr.Character:WaitForChild("Humanoid")
	hum.Health = hum.Health - 99
end)

This discussion is preserved as it was. New answers, comments, and votes are closed.