Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

This Is Working In Studio test but not in the real game why gui problem with mousebutton1click?

script.Parent.MouseButton1Click:connect(function()
	script.Parent.Parent.Parent.Beta.Visible = false
	script.Parent.Parent.Parent.Main.Visible = true
end)

this does work in studio but not in game does this have with filtering enabled

if this is i need to re-script all my gui's

9 comments

0

Can you post some more information like the hierarchy of your GUI itself, whether this is in a local or server script etc

0

That should be working, make sure you're doing the correct script.Parent's and put a print("something") to debug. Also you shouldn't have a script in every single button, there are more simple ways.

0

i do it works in studio but not in the game it self

0

Hoky, is it a server script or local script?

0

its a normal script in a gui

0

use Connect , connect is deprecated

0

Use a local script, server scripts in player gui do not work with filtering enabled.

0

thanks Xeiffel i changed all scripts to local scripts and now it works

0

No problem.

1 answer

✓ Accepted answer

Well, most likely this will work,

script.Parent.MouseButton1Click:Connect(function()
 script.Parent.Parent.Parent:WaitForChild("Beta").Visible = false
 script.Parent.Parent.Parent:WaitForChild("Main").Visible = true end)

Sorry,im typing from phone so... codeblocks are shitty...

1 comment

0

Lel, didn't saw that it's answered.

This discussion is preserved as it was. New answers, comments, and votes are closed.