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

i made a script to open a gun shop for my fps game when i click it it does not show the shop?

Asked by 2 years ago

i i made a script to open a gun shop for my fps game and when i click on the open shop button i get this Players.Auqa_dash.PlayerGui.MainMenu.MenuFolder.ShopButton.Open:1: invalid argument #1 to 'Connect' (RBXScriptSignal expected, got function)``

here is my code to open the shop: script.Parent.MouseButton1Click.Connect(function() script.Parent.Parent.Parent.Shop.Visible = true end) does anyone know how to fix this?

1 answer

Log in to vote
0
Answered by 2 years ago

Instead of using ".", you need to use ":" because it is a function.

:Connect()

not

.Connect
0
thank you so much this worked! Auqa_dash 1 — 2y
Ad

Answer this question