Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

EASY SCRIPT, (need help) waitforchild is not working, starterGui nil value?

Asked by
iDevity -2
6 years ago

local Job = StarterGui:WaitForChild("Job"):WaitForChild("Frame") I need help this doesn't work, i think got it incorrect Players.iDevity.PlayerGui.Gui.TextButton.Script:1: attempt to index global 'StarterGui' (a nil value)

0
You need to do game.StarterGui AstrealDev 728 — 6y
0
Is this a local script? hiimgoodpack 2009 — 6y
0
ya iDevity -2 — 6y

1 answer

Log in to vote
0
Answered by
Nowaha 459 Moderation Voter
6 years ago

If you want to wait for the gui inside of the player you will need to do

local Job = game.Players.LocalPlayer.PlayerGui:WaitForChild("Job"):WaitForChild("Frame")

StarterGui is not a member of a player. StarterGui's contents get cloned to the players PlayerGui.

http://wiki.roblox.com/index.php?title=API:Class/PlayerGui

0
yep Araknala 14 — 6y
Ad

Answer this question