Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

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

Asked by 4 years ago
Edited by JesseSong 4 years ago

Please encode Lua code in the Lua block code tag (look for the Lua icon in the editor).

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)
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 AntoninFearless 622 — 4y
0
Also is there any output errors? AntoninFearless 622 — 4y
0
Well, if there's no errors, the script should work fine. Just check your Frame, there might be problem in it. BestCreativeBoy 1395 — 4y

1 answer

Log in to vote
0
Answered by 4 years ago
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.

0
There are a lot of erroris when it comes to capitalization in your script JeffTheEpicRobloxian 258 — 4y
0
Tel me, did you write this script while on mobile? BestCreativeBoy 1395 — 4y
Ad

Answer this question