Remote Event Not Firing

Hello! I am sort of new to scripting, so when I encountered this problem I did not know how to solve it. Can somebody explain to me why my event is not firing, even though I set everything up correctly. I am pretty sure that it has something to do with the “wait,” but I am not entirely sure why. I will attach my script below, essentially I am trying to create a vending machine that can give the player a bottle of bloxy cola every two minutes.

1 Like

Can you show me how you are handling the RemoteEvent on the Client?
Another thing, the code you showed above is inside of a Server Script, correct?

2 Likes

Yeah, it is inside of a script in workspace that is in the vending machine.

1 Like

Your LocalScript looks good. However, if the LocalScript is also in the Workspace, then you do have a problem, since LocalScripts do not run there. Instead, try placing it in StarterPlayerScripts.

2 Likes

You shouldn’t change MaxActivationDistance at all in the server script, because your disabling the click detecter from input for the 120 seconds, while your still wanting input to tell the client there is a cooldown

2 Likes

I am literally so stupid, thank you

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.