So I have a script, that when a intValue is updated, it should change a textBox.
I wrote a script:
1 | maxHealth = script.Parent.Parent.Parent.MaxHealth |
2 | Health = script.Parent.Parent.Parent.Health |
3 |
4 | Health.Changed:Connect( function () |
5 | script.Parent.Text = Health.Value + " / " + maxHealth.Value |
6 | 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.
Try this script to see if it will work, to connect two strings you have to use two periods ".."
1 | maxHealth = script.Parent.Parent.Parent.MaxHealth |
2 | Health = script.Parent.Parent.Parent.Health |
3 |
4 | Health.Changed:Connect( function () |
5 | script.Parent.Text = Health.Value .. " / " .. maxHealth.Value |
6 | end ) |