giver = game.Workspace.Fifty+ Health.Head local player = game.Workspace.LocalPlayer game.Worksace.player:GetPlayers("Humanoid") health = 150 function onTouched(giver) if players:onTouched(giver) then player.Humanoid.Health(health) end end script.Parent.Touched:connect(onTouched)
It's when you touch, you get 150 health, it won't work. Why?
function onTouch(part) local humanoid = part.Parent:FindFirstChild("Humanoid") if (humanoid ~= nil) then -- if a humanoid exists, then humanoid.MaxHealth = 150 -- sets MaxHealth to 150 humanoid.Health = 150 -- sets Health to 150 end end script.Parent.Touched:connect(onTouch)
Use this code above. Your code would not work for many reasons. Add the script to your part!