I don’t know if I’m stupid or what,but my game doesn’t allow me to add more than 1 screengui for game
local test = script.Parent.Test --Is a screengui



I don’t know why It doesn’t work,I tried everything please someone helps me.
Not everything on the client is guaranteed to load at the same time. Use WaitForChild.
local text = script.Parent:WaitForChild("Test")
2 Likes
Use WaitForChild
local text = script.Parent:WaitForChild(“Text”)
It takes some time for all the ScreenGuis to replicate to the client, just use :WaitForChild("").
I wouldn’t recommend using WaitForChild, I would wait 0.2 seconds for the client to load in. WaitForChild slows stuff down but I guess it’s also okay as it’s the first thing the script does.
Thank you,it was very helpful.
WaitForChild doesn’t slow things down. It’s safe to use, safer than waiting .2 anyways. It’s more proper.
1 Like