Problem with script:

I want a button that says: “Change Roleplay Name” to be clicked, and then the menu opens up. I inserted this script that I typed myself, and it worked… Only for me. When I opened team create and someone joined, they tested it, and the gui was stuck on their screen. Here is the code:

local Button = script.Parent
local Frame = script.Parent.Parent.Parent.MainFrame

Frame.Visible = false

Button.MouseButton1Click:Connect(function()
	if Frame.Visible == true then
		Frame.Visible = false
	else
		if Frame.Visible == false then
			Frame.Visible = true
		end
	end
	end)

As I mentioned above, it worked for me, but it didn’t work for them.
This is a LocalScript.

local Button = script.Parent
local Frame = script.Parent.Parent.Parent.MainFrame

Frame.Visible = false

Button.MouseButton1Click:Connect(function()
   Frame.Visible = not Frame.Visible
end)
2 Likes

Thanks, your script worked, and it was less messy, but I found out that it was because my script was uncommitted. Sorry! :sweat_smile: