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.

1?player = game.Workspace.Player1.Humanoid
2function painspeed()
3if player.Health <= 15 then
4player.WalkSpeed = 11
5else player.Walkspeed = 20
6end
7end
8painspeed()

Why doesn't this work? Please help.?

1 answer

Log in to vote
1
Answered by 10 years ago
1player = game.Workspace.Player1:WaitForChild("Humanoid")
2 
3while wait() do
4player.WalkSpeed=(player.Health / player.MaxHealth) * 16
5end
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