Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
2

Why doesn't this work? Please help.?

Asked by 10 years ago

This script's goal is to make the player slow down when his health is down.

?player = game.Workspace.Player1.Humanoid
function painspeed()
if player.Health <= 15 then
player.WalkSpeed = 11
else player.Walkspeed = 20
end
end
painspeed()

Why doesn't this work? Please help.?

1 answer

Log in to vote
1
Answered by 10 years ago
player = game.Workspace.Player1:WaitForChild("Humanoid")

while wait() do
player.WalkSpeed=(player.Health / player.MaxHealth) * 16 
end
0
THANKS Relampago1204 73 — 10y
0
np. nighttimeninja314 120 — 10y
0
Where do I put this local script? Relampago1204 73 — 10y
Ad

Answer this question