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

How to change textbox (billboard gui) when updated?

Asked by 4 years ago

So I have a script, that when a intValue is updated, it should change a textBox.

I wrote a script:

maxHealth = script.Parent.Parent.Parent.MaxHealth
Health = script.Parent.Parent.Parent.Health

Health.Changed:Connect(function()
        script.Parent.Text = Health.Value + " / " + maxHealth.Value
end)

but it wasn't working. I have gone trough many variations but hasn't been working.

Can I have some help, please? Thank-yous in advance, Biz.

1 answer

Log in to vote
1
Answered by
Fad99 286 Moderation Voter
4 years ago
Edited 4 years ago

Try this script to see if it will work, to connect two strings you have to use two periods ".."

maxHealth = script.Parent.Parent.Parent.MaxHealth
Health = script.Parent.Parent.Parent.Health

Health.Changed:Connect(function()
        script.Parent.Text = Health.Value .. " / " .. maxHealth.Value
end)
0
Thank you! BizzareBazaar 22 — 4y
0
Your Welcome!! Fad99 286 — 4y
Ad

Answer this question