I’m making a button gui for a multiplayer game but then
an error pops up saying “JoinServerGui is not a valid member of PlayerGui”
Here’s how its organized:
and here’s the script:
local Button = script.Parent.ServerGUI.MainFrame.Frame.MultiPlayer
local Frame = script.Parent.JoinServerGUI.Frame
local BoolValue = script.Parent.JoinServerGUI.Frame.Frame.ImageLabel.Bool.Value
Button.MouseButton1Down:Connect(function()
BoolValue = true
Frame.Visible = true
end)
Sometimes, scripts load and execute code before the game loads in everything to the player. That’s where WaitForChild comes into play.
I’ve made a basic change to your code, try the code I posted above.
^ There are a lot of ways to fix it, not just WaitForChild.