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

Why does the speed work but the health doesn't?

I made a script that gives extra speed and extra health and theres one problem: the health isn't working. The speed works just fine but for some reason it doesn't give me the extra health.

Here's the script:

game.Players.PlayerAdded:Connect(function(player)
	player.CharacterAdded:Connect(function(character)
		local humanoid = character:WaitForChild("Humanoid")
		humanoid.WalkSpeed = 24
		humanoid.Health = 1000
	end)
end)

3 comments

0

To my knowledge, health can only go up to 100. Maybe try making 1000, 100.

0

Ok, I'll try that and let you know if it works

0

Yup, the problem was the max health. Ty!

1 answer

✓ Accepted answer

You cannot change the health to a higher number than the maxHealth. You'll need to add:

humanoid.MaxHealth = 1000

before it

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