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

Why isnt this working?

Asked by 10 years ago
while true do
game.Workspace.Player.Humanoid.Health=100
wait(3)
game.Workspace.Player.Humanoid.Health=98
wait(3)
game.Workspace.Player.Humanoid.Health=96
wait(3)
game.Workspace.Player.Humanoid.Health=94
wait(3)
game.Workspace.Player.Humanoid.Health=92
wait(3)
game.Workspace.Player.Humanoid.Health=90
wait(3)
game.Workspace.Player.Humanoid.Health=88
wait(3)
game.Workspace.Player.Humanoid.Health=86
wait(3)
game.Workspace.Player.Humanoid.Health=84
wait(3)
game.Workspace.Player.Humanoid.Health=82
wait(3)
game.Workspace.Player.Humanoid.Health=80
wait(3)
game.Workspace.Player.Humanoid.Health=78
wait(3)
game.Workspace.Player.Humanoid.Health=76
wait(3)
game.Workspace.Player.Humanoid.Health=74
wait(3)
game.Workspace.Player.Humanoid.Health=72
wait(3)
game.Workspace.Player.Humanoid.Health=70
wait(3)
game.Workspace.Player.Humanoid.Health=68
wait(3)
game.Workspace.Player.Humanoid.Health=66
wait(3)
game.Workspace.Player.Humanoid.Health=64
wait(3)
game.Workspace.Player.Humanoid.Health=62
wait(3)
game.Workspace.Player.Humanoid.Health=60
wait(3)
game.Workspace.Player.Humanoid.Health=50
wait(3)
game.Workspace.Player.Humanoid.Health=42
wait(3)
game.Workspace.Player.Humanoid.Health=40
wait(3)
game.Workspace.Player.Humanoid.Health=32
wait(3)
game.Workspace.Player.Humanoid.Health=30
wait(3)
game.Workspace.Player.Humanoid.Health=22
wait(3)
game.Workspace.Player.Humanoid.Health=20
wait(3)
game.Workspace.Player.Humanoid.Health=12
wait(3)
game.Workspace.Player.Humanoid.Health=10
wait(3)
game.Workspace.Player.Humanoid.Health=0
end

2 answers

Log in to vote
0
Answered by
Spectrobz 140
10 years ago

If you want to make this run online, you should put it in a local script, put the script in the player and replace game.Workspace.Player to game.Players.LocalPlayer.Character

0
thanks Blitz12234 10 — 10y
Ad
Log in to vote
0
Answered by 10 years ago

Also, Loops are helpful.

for i = game.Players.LocalPlayer.Character.Humanoid.Health, 0, -2 do
game.Players.LocalPlayer.Character.Humanoid.Health = i
wait(3)
end

Answer this question