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

How do I make my Open Shop button work? Not sure if it's on Roblox's side or my side.

For some reason, i've appeared to have entered in everything correctly, but the shop GUI isn't working. Is something wrong with my code? it's this:


local player = game.Players.LocalPlayer

script.Parent.MouseButton1Click:Connect(function()
  player.PlayerGui.ToolShop.Frame.Visible = true
end)

3 comments

0

TIP: Put your script in a code block, to do that you press the little lua icon that you see when editing/asking a question, it will make a "box" where you will insert your script and make it more readable

0

Also is there any output errors?

0

Well, if there's no errors, the script should work fine. Just check your Frame, there might be problem in it.

1 answer

Script.Parent.MouseButton1Click:Connect(Function() -- When you press the first GUI button do this function
Game.players.localplayer.PlayerGui.OTHER GUI.Enabled = true -- sets the second GUI to be visble
End)

This will make when a gui is clicked it will make another gui open. This will work for sure. This should be a local script under the button.

Let me know if it works.

2 comments

0

There are a lot of erroris when it comes to capitalization in your script

0

Tel me, did you write this script while on mobile?

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