script.Parent.Parent.Character.Humanoid.Health = script.Parent.Parent.Character.Humanoid.MaxHealth
so everytime the character respawns his health is at max thanks :)
script.Parent.Parent.Character.Humanoid.Health = script.Parent.Parent.Character.Humanoid.MaxHealth
so everytime the character respawns his health is at max thanks :)
You could just use a server script for this. Every time a player is added and their character is added or respawned, you can set their Humanoid's health to their MaxHealth.
game.Players.PlayerAdded:connect(function(plr) --When a player is added.
plr.CharacterAdded:connect(function(char) --When that player's character is added/respawned.
local hum = char:WaitForChild("Humanoid") --Waits for the Humanoid to become available.
hum.Health = hum.MaxHealth --Sets the Humanoid's health to max health.
end)
end)
However, I don't see why you are doing this because a player spawns in with maximum health already, unless you're using another script to change their max health as they spawn.
I hope I answered your question. If I did, be sure to accept my answer.
This discussion is preserved as it was. New answers, comments, and votes are closed.
2 comments
yes i did answer my question thanks ;) , and the script is for my RPG, in which their health gradually increases every level etc. thanks again!
No problem.