of     1   

GalaxyFPS_Studios
#228416124Monday, December 04, 2017 4:10 AM GMT

I have a simple script that i have no clue why it wont work. The humanoid takes damage but doesnt change to value of health or change the humanoids health, even though the health bar above the character lowers. ```````````````````````` health = game.Workspace.Objective.Humanoid.Health while true do wait(0.01) script.Parent.Text = ("Supply Health || " .. health) end ```````````````````````` -GalaxyFPS Studios
128Gigabytes
#228416423Monday, December 04, 2017 4:22 AM GMT

You've made a common mistake, on this line health = game.Workspace.Objective.Humanoid.Health You are not linking health to the property 'health' If health is at 100 when that line runs you are basically saying health = 100 So its never going to change. Here is a fixed version of yours local humanoid = game.Workspace.Objective.Humanoid while (true) do wait(0.03) --[[You can't wait less than this.]] script.Parent.Text = ("Supply Health || " .. humanoid.Health) end And here is a more efficient (read: less laggy) version game.Workspace.Objective.Humanoid.HealthChanged:Connect(function(health) script.Parent.Text = ("Supply Health || " .. Health) return (nil); end)
128Gigabytes
#228416450Monday, December 04, 2017 4:23 AM GMT

I made a typo in the second one change this line script.Parent.Text = ("Supply Health || " .. Health) to this script.Parent.Text = ("Supply Health || " .. health)
200Ethan
#228416453Monday, December 04, 2017 4:23 AM GMT

Simple, health is being called ONCE, outside the loop, and not being changed, because like I said previously, it's only being called one time. To call it multiple times, all you have to do is put it somewhere inside the loop. > print("My siggy: '", siggy, "' is the best." ) My siggy: ' nil ' is the best.

    of     1