Help with error on script

Hello, today I was making a shop that you only can get by clicking with the " Hands " but when I finish doing it, doesnt works, let me show you the code of the button.

image
image

The GUI of the button is Replicated Storage

The issue is that when I click it, the GUI doesn’t spawns, If you know how to fix it reply this message please.

  • Took some ideas from Boulevard *

Uhhh, i do not get how do you use your GUI from replicated storage, bec i don’t see any clone to PlayerGui, i don’t get it.

The thing is that theres a event that runs GUI…

But IDK why it doesn’t works because it should.

Do you have another script that clones the gui when the event is fired?

No, its just that, that script fires the ClickDetector and the ClickDetector fires a GUI remote and then the GUI remote should clone the GUI.

Click detectors don’t work in guis. Try using a text button or image button and listening to the .Activated event.

It is not a click detector, It is remote called clickdetector

Or you could use MouseButton1down, which is quite easy.

Wait, I totally misread this. That being said, are you sure the click detector event is firing. Try putting a print statement in there.

If you can share your client code, that would be useful.

Ok, but your never firing the event

Yeah, maybe I can do that and remove that munch remotes, just a MouseButton1Down with clickdetector that when you click it, it clones the GUI to the playerGui

image

it works

Put the print statement between the words “function” and “end”. The code outside of those lines always executes. The code between them executes only when the event occurs.

Also, are you sure the code on the client is being setup properly?

Side note: you don’t need the wait(1) at the top.



I click it sometimes and it prints it

Perfect. Now we need to check on the client side. Go find the client side event listening to that event, and put a print statement inside of that connecting event and make sure a gui is being shown there.

image
ok ! the event it is firing is the GUI one, so ill go to the ReplicatedStorage.Events and there it is the event of GUI.
image

I don’t really know from where do that GUI remote.event comes or what it does…

I got an idea, ill try to open a door that uses the same system and if it works we should know where go and if it doesn’t then we know that is the hands what doesn’t works.


The hands works in the door thing, so its the other button fault.

I see. You can do ctrl + f for the “GUI” and find all references to it. You’ll need to hook up the .OnClientEvent to custom code and make it do whatever you want it to do.