[SOLVED] "VersionGui is not a valid member of PlayerGui "Players.kdopdaux1803.PlayerGui""

Hello guys, i just found another issue…

This one is the worst bug ever because it says that:

VersionGui is not a valid member of PlayerGui “Players.kdopdaux1803.PlayerGui”

Script of the issue:

if script.Parent.MenuFrame.Visible == true then
	script.Parent.Parent.FPSGui.Enabled = false
	script.Parent.Parent.VersionGui.Enabled = false
	script.Parent.Parent.InviteFriendsPlease.Enabled = false
	script.Parent.Parent.GoToMyOtherGamesGui.Enabled = false
else
	script.Parent.Parent.FPSGui.Enabled = true
	script.Parent.Parent.VersionGui.Enabled = true
	script.Parent.Parent.InviteFriendsPlease.Enabled = true
	script.Parent.Parent.GoToMyOtherGamesGui.Enabled = true
end

Image of this issue:

Couldn’t find any images because it already says it on the title…

I’m extremely pissed off because of this bad issue…

Any help is appreciated…

2 Likes

if its a frame do .Visible not .Enabled

2 Likes

It’s a ScreenGui…

Not a Frame…

ru sure that VersionGui exists in the PlayerGui?

2 Likes

the game is probably loading too fast though, try adding WaitForChild(" ")

2 Likes

2 Likes

Okay…

Chat limit

1 Like

i don’t see the error here.
[Char Limit]

1 Like

Line 16 / Line 21.

A

i can’t see line 16/21 in the script that you showed, can you show me the full script?

1 Like

Fine i’ll do it…

But hey, you are not allowed to show the full script, huh ?

Script:

local GameName = string.gsub(game.Name,"[%d%p]","")
script.Parent.MenuFrame.Title.Text = "Welcome to "..GameName
local frame: Frame = script.Parent.MenuFrame

-- Play button
script.Parent.MenuFrame.Play.MouseButton1Click:Connect(function()
	script.Parent.MenuFrame.Visible = false
end)
-- Quit button
script.Parent.MenuFrame.Quit.MouseButton1Click:Connect(function()
	game.Players.LocalPlayer:Kick("Rejoin !")
end)

if script.Parent:WaitForChild("MenuFrame").Visible == true then
	script.Parent.Parent.FPSGui.Enabled = false
	script.Parent.Parent.VersionGui.Enabled = false
	script.Parent.Parent.InviteFriendsPlease.Enabled = false
	script.Parent.Parent.GoToMyOtherGamesGui.Enabled = false
else
	script.Parent.Parent.FPSGui.Enabled = true
	script.Parent.Parent.VersionGui.Enabled = true
	script.Parent.Parent.InviteFriendsPlease.Enabled = true
	script.Parent.Parent.GoToMyOtherGamesGui.Enabled = true
end

i think you have to close the local script so it gets published since you have team create on.
i don’t see your PlayerGui error in there
so as i said you may have to close your localscript in order for it to get published.

1 Like

No, line 16 is this:

script.Parent.Parent.VersionGui.Enabled = false

And line 21 is this:

script.Parent.Parent.VersionGui.Enabled = true

add a waitforchild for it.
[Char Limits]

1 Like

Not trying to be rude, but this is a developer forum. Nobody is gonna steal a broken, in development script that they don’t even have the guis for.

6 Likes

I know, right ?

But the VersionGui is literally the same place and it says i have an error…

you should really use more variables so you could write cleaner code

you could also loop through LocalPlayer.PlayerGui and disable every Gui without having to do
Gui1.Enabled = false
Gui2.Enabled = false
Gui3.Enabled = false

1 Like

Try what @BonesIsUseless says

local GameName = string.gsub(game.Name,"[%d%p]","")
script.Parent.MenuFrame.Title.Text = "Welcome to "..GameName
local frame: Frame = script.Parent.MenuFrame

-- Play button
script.Parent.MenuFrame.Play.MouseButton1Click:Connect(function()
	script.Parent.MenuFrame.Visible = false
end)
-- Quit button
script.Parent.MenuFrame.Quit.MouseButton1Click:Connect(function()
	game.Players.LocalPlayer:Kick("Rejoin !")
end)

if script.Parent:WaitForChild("MenuFrame").Visible == true then
	for i, UI in ipairs(game.Players.LocalPlayer.PlayerGui:GetChildren()) do
		if UI:IsA("ScreenGui") then
			UI.Enabled = false
		end
	end
else
	for i, UI in ipairs(game.Players.LocalPlayer.PlayerGui:GetChildren()) do
		if UI:IsA("ScreenGui") then
			UI.Enabled = true
		end
	end
end
2 Likes

I guess it worked but the menu didn’t showed up…