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:

while wait() do
script.Parent.Value = script.Parent.Parent.Parent.PlayerGui:WaitForChild("HealtGui").Mana.Value
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.

6 comments

0

If you are doing it correctly, why ask for help?

0

Sorry, I forgot to put the 'not', Lol.

0

Did you spell "Health" correctly? It shows "HealtGui" on the script.

0

That's what I called the gui

0

what does the output says? script LOOKS fine for me.

0

It says, "Infinite Yield possible'