I'm trying to make a script that changes the value of the script's parent, a number value, to whatever the player's 'Mana' is. But apparently, I'm not doing this correctly, please help?
The Script is in a NumberValue in StarterPack, here it is:
1 | while wait() do |
2 | script.Parent.Value = script.Parent.Parent.Parent.PlayerGui:WaitForChild( "HealtGui" ).Mana.Value |
3 | end |
I put a Game GUI that shows the stats of the player, like Heath and Mana. The thing is, the Game GUI appears after the player clicks 'Continue'. That's why I added in that 'WaitForChild', to wait for the Game GUI that I placed in the StaterGui.