I have a script that is meant to display the text of a TextLabel as an IntValue is a player. It is in the PlayerGUI as is the Apples IntValue. (Image here: http://mystdar-roblox.deviantart.com/art/Apples-487189581?ga_submit_new=10%253A1412791523)
The script is like this
while wait(.1) do
local apple_count = script.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Apples
script.Parent.Text= "Apples:" .. apple_count.Value
end
I aim to make it only fire/occur when the value is changed, if you could help with that too, that would be great. Thanks.

6 comments
Is apples:Changed meant to be apples.Changed?
This one works, thanks, one small error, (on my part) the script only fires when it is changed, so until the unit is changed it just says Apple: Any help?
Yeah, good eyes. Ha ha. Also, just set the Text property of the script's parent to "Apples: 0" (without the quotes) initially.
That would only work if their one was 0, I intent to save this Int so if someone rejoined and had 20 apples, then it wouldn't be one, yes? Thanks for the compliment, btw.
Yeah, copy line 5 to line 3 so that it sets the text property to the Apples value before the Changed event occurs.
Alright, thanks.