I want to give a certain amount of health to a player when they join a server. I'm new to scripting but this should be a simple one; but it's not working?!
This is all I've got right now:
game.workspace.PLAYERNAME.Humanoid.MaxHealth= 130
I feel as if this should work but it's not even giving me the health! Please somebody help me out ):
Thank You
Hi, I'll explain the correct script to you.
game.Players.PlayerAdded:connect(function(player) --Function to see when the player joins the game player.CharacterAdded:connect(function(character) --loading the character, this lets us access the humanoid where the health is at. local hum = character:WaitForChild("Humanoid") hum.MaxHealth = 130 hum.Health = 130 end) end)
Let me know if you have any questions! Here you go:) Just put this in workspace, accept if it helped. This changes to health when a player joins the game.