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

how come when your health is lowwer than 35 the script doesnt work?

Asked by
Tizzel40 243 Moderation Voter
5 years ago

heres the script when the health is lower then the lowamt (low amount) then the frsme should be visible and the sound should play

local play = game.Players.LocalPlayer

local lowamt = 35

--play.Character.Humanoid.Health.Changed:Connect(function()
 if play.Character.Humanoid.Health <= lowamt then
    script.Parent:Play()
    script.Parent.Parent.lowgui.lowhealthframe.Visible = true

end
--end)

but its not happening?

0
is the play.Character.Humanoid.Health.Changed:Connect(function() commented out when you post it here? aazkao 787 — 5y
0
yes Tizzel40 243 — 5y
0
Try putting it in while true do hopup 15 — 5y
0
no User#19524 175 — 5y

1 answer

Log in to vote
0
Answered by 5 years ago

here

local play = game.Players.LocalPlayer

local lowamt = 35

play.Character.Humanoid.Changed:Connect(function()
 if play.Character.Humanoid.Health <= lowamt then
    script.Parent:Play()
    script.Parent.Parent.lowgui.lowhealthframe.Visible = true

end
end)
0
isnt that his script but with just the -- removed ScrubSadmir 200 — 5y
Ad

Answer this question