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

Why does it appear that this script is not running at all?

Asked by 4 years ago

First of all, this may sound like a dumb question but I haven't seriously attempted to do lua in roblox in like 6 months and it's been a year since I learned anything new

I'm just trying to make a gui that displays a players health with a gui that's y dimension is 3 times larger in scale than the health of the humanoid.

None of my print statements or anything really at all is working literally there is no output and no visible change on my gui. Can someone please help me figure this out!?!?!?

health = script.Parent.background.health
stamina = script.Parent.background.stamina

game.Players.PlayerAdded:Connect(function(plr)
    plr.CharacterAdded:Connect(function(chr)
        print('yeehaw dawgy')
        for i=1, math.huge() do
            wait()
            print(chr.Humanoid.Health)
            health.Size = health.Size - UDim2.new(0, 0, 0, chr.Humanoid.Health * 3)
            health.Position = health.Size - UDim2.new(0, 0, 0, chr.Humanoid.Health * 1.5)
            print(health.Size)
            print(health.Position)
        end
    end)
end)
0
What type of script is this and where is it in your game? LukeSmasher 619 — 4y

1 answer

Log in to vote
0
Answered by
OBenjOne 190
4 years ago

I assume the problem is that you are using a script, when you should be using a local script. I think some semi-recent roblox updates changed some server/client stuff.

Ad

Answer this question