Remote Events not firing at all

To begin with, I am relatively new so I am not sure if I should post in this category or not, if so please assist me so that I can fix the tags. However, I am working on a boxing game, which will have character customization. During the character customization screen, every time you click the arrow, it will change the value to a certain number which will match the characters skin to that value number. This works perfectly fine in play mode, however if I were to start a server it absolutely fails to even run the event. Here was my initial script

Script 1: local script would contain the following in a GUI:

script.Parent:WaitForChild(“Button”).MouseButton1Down:connect(function()
print(“The button has been clicked”)
script.Parent:WaitForChild(“RemoteEvent”):FireServer()
print(“finished”)
end)

Script 2: A regular script to handle the event

script.Parent:WaitForChild(“RemoteEvent”).OnServerEvent:connect(function()
print(“Event Fired”)
end)

That is just an example of how the script was made, but I’d only get the print that said “The Button Was Click” and NOT the print that was in the event that told me the event was fired. For some reason it completely ignores the fact that I fired the event and even skips down to the print below the event which says “Finished”. I do not get any errors while doing this and I cannot figure out a way to fix this. This even happened when I copied and pasted the script from one game to another, and it still refused to fire the event.

Although this script absolutely fails when testing in Test mode or an actual server instance, when I press the play button, everything works 100% fine. What should I do? Is this an actual bug or is it a fault in my coding? I had experience with FE for a while now and I am not sure what I am doing wrong at this point.

2 Likes

Where is the RemoteEvent located?

1 Like

The issue here is that you’re attempting to do a server management locally.

Put the RemoteEvent in ReplicatedStorage (where both the client and the server has access to) and put the global scripts under ServerScriptService. In FE, you can’t edit the server from the client.

I’m a bad explainer, I know, but feel free to ask clarifying questions :stuck_out_tongue:

4 Likes

I have moved the remote event into Replicated Storage however the bug is still present. The event only fires in Play mode, but never in test mode.

1 Like

I made an example use of a RemoteEvent. Compare this to what you have.

RemoteEvent Example.rbxl (16.7 KB)

3 Likes

Ahh I shouldve put the script that handles the event in script server storage. Thank you so much!

3 Likes

Please mark the comment that solved your problem (hit the checkmark button next to the like button) to indicate that this bug report is no longer relevant. (it will show an icon in the title that the thread is solved that way)

5 Likes

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