Why does this local script not change my UI's text?
I have a local script that changes the UI's text depending on how much currency (coins) you have but when I try test it, I get no print messages and the text doesn't change at all! The UI is inside StarterGUI and the currency folder is inside the player (same place where you would have your leaderstats folder).
The local script:
01 | game.Players.PlayerAdded:Connect( function (plr) |
02 | local coins = plr:WaitForChild( "Currency" ).Coins |
05 | script.Parent.Text = coins.Value |
07 | coins:GetPropertyChangedSignal( "Value" ):Connect( function () |
08 | script.Parent.Text = coins.Value |