I would like to have it to where once I click the click detector the GUI opens and becomes visible but cannot do so
Once I click on the click detector, the GUI simply does not open up, this GUI is located in the starter GUI.
I have attempted to look around, but couldn’t find any solutions tailored to my script, I attempted moving the local scripts around but didn’t get any progress.
local shopGUI = game.StarterGui.DealerGUI.ShopGUI
local clickdetector = script.Parent.ClickDetector
script.Parent.ClickDetector.MouseClick:Connect(function()
shopGUI.Visible = true
end)
Assuming this is a SERVER script, you must use the player parameter that MouseClick provides to make the gui visible. Also, startergui gets replicated into PlayerGui for every player, it’s useless to try and set variables for startergui.
Assuming this is a CLIENT script, I’m not sure if these events fire on the client, you could make a remote event on the server and fire it or just do what I said above. Make sure whenever defining gui variables you do: