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

Anyone Know How to Get This to Work?

Asked by 10 years ago
local player = game.Players.LocalPlayer.Character

if player then
    player.Humanoid.Health = 10
end

3 answers

Log in to vote
0
Answered by
l0cky2013 135
10 years ago

I don't see any errors. You might want to do this.

local player = game.Players.LocalPlayer.Character
while player == nil do wait() end
player.Humanoid.Health = 10

Ad
Log in to vote
0
Answered by 10 years ago

You shouldn't really say 'if player then'. I believe that was your problem as to why it was not working previously.

0
Should I just take it out or? UltraTopher 0 — 10y
Log in to vote
0
Answered by 10 years ago

@l0cky2013 That didn't work either. That is meant for a local script, correct?

0
Yeah, make sure it is in either StarterPack or StarterGui. l0cky2013 135 — 10y
0
StarterPack didn't work? UltraTopher 0 — 10y

Answer this question