Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How to change textbox (billboard gui) when updated?

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

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)

2 comments

0

Thank you!

0

Your Welcome!!

This discussion is preserved as it was. New answers, comments, and votes are closed.