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

My remoteevent to open a shop isn't working. How do I fix?

Asked by 5 years ago
Edited 5 years ago

Basically when I click a button on a GUI it opens up another screengui. I'm using remotefunctions to enable the GUI but it isn't working.

Here is the code in my button:

script.Parent.MouseButton1Click:Connect(function()
    game.ReplicatedStorage.OpenShop:FireServer()
end)

Here is my code in the other GUI (the one I want to be enabled):

game.ReplicatedStorage.OpenShop.OnServerEvent:Connect(function()

    script.Parent.Enabled = true
end)

They're both in local scripts.

Here's the code I had before:

script.Parent.MouseButton1Click:Connect(function()
    script.Parent.Parent.Parent.ShopGUI.Enabled = true
end)
0
oh my poor child. DinozCreates 1070 — 5y
0
There's no need to use a remoteevent, as they are both on the same client turtle2004 167 — 5y
0
If I don't, it says it's not a valid member of playergui. TypicallyPacific 61 — 5y
0
Edit this with the code you had before and we can help you from there. SteamG00B 1633 — 5y
View all comments (2 more)
0
Nevermind. I forgot to add another .Parent. TypicallyPacific 61 — 5y
0
Why are you using a RemoteEvent to open a shop exactly???? iiDev_Hunt3r 64 — 5y

Answer this question