How Do I Fix This

I am trying to call the ValueUI and an error comes up

ValueUI is not a valid member of PlayerGui “Players.Cyber_Designer.PlayerGui”

This is a picture in game
Screenshot 2023-08-16 at 15.31.45

The script stops here at this line how do I fix this

local stat = script.Parent.Parent.ValueUI.Stat
3 Likes

try adding WaitForChild(), if your code runs as soon as the game starts the UI might not have time to load

4 Likes

Never hurts to add a task.wait(3) or 5 on top of scripts like this. Gives them time to be ready and most the time they are not going to be used in the 1st few seconds anyways.

3 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.