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

Loading is not a valid member of PlayerGui?

Asked by 7 years ago
Edited 7 years ago

I don't understand what's wrong my script is a local script and the gui is inside of the localplayer

 m = game.Players.LocalPlayer.PlayerGui:WaitForChild("Loading")
script.Parent.MouseButton1Click:connect(function(hit)
m.LFrame.Visible = true
wait(3)
m.LFrame.Visible = false
end)

That''s all it is but it says

10:48:47.520 - Loading is not a valid member of PlayerGui
10:48:47.521 - Stack Begin
10:48:47.521 - Script 'Players.arrowman888.PlayerGui.Save_Data.Frame.Load.LocalScript', Line 1
10:48:47.521 - Stack End

1 answer

Log in to vote
1
Answered by
Bulvyte 388 Moderation Voter
7 years ago

local m = game.Players.LocalPlayer.PlayerGui:WaitForChild("Loading")

Basically waits for the child to get added.

Enjoy

Ad

Answer this question