Roblox RemoteEvent Not Firing? How to Fix OnServerEvent
Why a Roblox RemoteEvent seems to do nothing, and how to fix OnServerEvent and OnClientEvent: script location, the player argument, nil values, and timing.
On this page
- How a RemoteEvent call travels
- Step 1: Add prints on both sides
- Step 2: Make sure each script is the right type and in the right place
- Step 3: Fix the handler’s arguments
- Step 4: Confirm both scripts use the same remote
- Step 5: Check that the Connect line actually runs
- Step 6: Watch out for UnreliableRemoteEvent and rate limits
- If it still doesn’t work
- Related guides
- Sources
When a Roblox RemoteEvent seems to do nothing, the event itself is almost never broken. Usually one of the two scripts isn’t running, the handler reads its arguments in the wrong order, or the client and server are using different remote objects. This guide goes through each cause in the order you should check them, using the behavior described in the Roblox Creator Hub documentation.
How a RemoteEvent call travels
A RemoteEvent is a one-way message between the client and the server. It has to sit somewhere both sides can see, which is why the Creator Hub uses ReplicatedStorage in its examples.
flowchart LR
A["LocalScript calls FireServer"] --> B["RemoteEvent in ReplicatedStorage"]
B --> C["Script: OnServerEvent"]
C --> D["Handler gets player, args"]
The reverse direction works the same way: the server calls FireClient(player, ...) or FireAllClients(...), and a LocalScript listens with OnClientEvent. If any box in that chain is missing, the message never shows up where you expect it.
Step 1: Add prints on both sides
Before changing anything, find out which side fails. Start with a minimal client and server pair.
In a LocalScript inside StarterPlayer › StarterPlayerScripts:
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local remote = ReplicatedStorage:WaitForChild("GiveCoins")
print("Client: firing")
remote:FireServer(10)
In a Script inside ServerScriptService:
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local remote = ReplicatedStorage:WaitForChild("GiveCoins")
print("Server: listening")
remote.OnServerEvent:Connect(function(player, amount)
print("Server: got", amount, "from", player.Name)
end)
The client finds the remote with WaitForChild, prints, and fires it with one value. The server connects a function to OnServerEvent and prints whatever arrives. Press Play in Studio and watch Output:
| What you see in Output | Where to look |
|---|---|
| No “Client: firing” | The LocalScript isn’t running (Step 2) |
| No “Server: listening” | The Script isn’t running or is stuck above Connect (Steps 2 and 5) |
| Both prints, but no “got” line | The two scripts use different remotes (Step 4) |
| “got” line with odd values | Argument order or nil values (Step 3) |
Test this in Studio before adding your real logic back in. Once the minimal pair works, you know the remote setup is fine.
Step 2: Make sure each script is the right type and in the right place
This is the most common cause. The Creator Hub’s script locations page says a LocalScript runs only on the client, and lists StarterCharacterScripts, StarterPlayerScripts, StarterGui, and StarterPack as places it runs from. It also says plainly that LocalScripts do not run from ReplicatedStorage. A LocalScript sitting in Workspace, ServerScriptService, or ReplicatedStorage won’t run at all, so it never fires anything.
On the server side, a Script uses the RunContext property. With the default, Legacy, it runs only from server containers such as ServerScriptService or Workspace. If your listener Script is in ReplicatedStorage with Legacy run context, it never connects.
| Script | Run context | Put it in |
|---|---|---|
Client code that calls FireServer or listens to OnClientEvent | LocalScript | StarterPlayerScripts, StarterGui, StarterCharacterScripts, or StarterPack |
Server code that listens to OnServerEvent or calls FireClient | Script, RunContext Legacy | ServerScriptService |
| The RemoteEvent itself | (not a script) | ReplicatedStorage |
Also check that you’re calling the right method on each side. FireServer and OnClientEvent belong to the client; OnServerEvent, FireClient, and FireAllClients belong to the server. A server Script that calls FireServer, or a LocalScript that connects to OnServerEvent, won’t get a message through.
Step 3: Fix the handler’s arguments
If the server prints the “got” line but the values look wrong, check the handler’s parameters. The OnServerEvent signature is (player: Player, arguments...). Roblox inserts the Player who fired the event as the first parameter, even though you didn’t pass it to FireServer.
-- Wrong: "amount" is actually the Player object
remote.OnServerEvent:Connect(function(amount)
print(amount)
end)
-- Right: player first, then your values
remote.OnServerEvent:Connect(function(player, amount)
print(player.Name, amount)
end)
The opposite applies to OnClientEvent: the client handler does not get a player parameter. When the server calls remote:FireClient(player, "Hello"), the client receives only "Hello". Use Players.LocalPlayer if the client needs to know who it is. If you mix these up in FireClient, you may also see the error covered in how to fix “Unable to cast value to Object”.
Values that arrive as nil or changed
Some data doesn’t survive the trip. According to the Creator Hub:
- Functions don’t replicate, so they arrive as
nil. - Instances that only one side can see arrive as
nil. A part a LocalScript created, or an object in ServerStorage sent to a client, falls in this group. - Tables are copied, so the receiver gets a new table, not the same one. Metatables are lost.
- Mixed tables (numeric and string keys together) and tables with
nilgaps don’t transfer reliably. Use either a plain array or a dictionary with string keys. - Non-string keys like Instances are converted to strings.
If the handler then tries to use one of those nil values, you get a follow-on error such as the one in fixing “attempt to index nil with”.
Step 4: Confirm both scripts use the same remote
If both scripts run but the server never prints the “got” line, they are probably talking to different objects. Common ways this happens:
- The client fires a remote in ReplicatedStorage while the server listens to a remote with the same name somewhere else, such as inside a part.
- There are two objects with the same name in the same folder, so each script may grab a different one.
- A script creates a new RemoteEvent with
Instance.newwhile another copy already exists in the Explorer. - The name is spelled differently on each side.
WaitForChildis case-sensitive, and a typo there usually shows up as an Infinite yield possible warning instead of an error.
Search the Explorer for the remote’s name and make sure only one exists. Then reference it by the same path in both scripts.
Step 5: Check that the Connect line actually runs
A script only listens after it reaches the Connect line. If anything above that line errors or never finishes, the connection is never made, and the event seems to do nothing:
- An error earlier in the script stops it. Look for a red error in Output above your prints.
- A loop like
while true do ... endaboveConnectkeeps the script busy forever. Move the connection above the loop, or run the loop withtask.spawn. - A
WaitForChildcall for an object that never appears keeps the script waiting. - Calling
Connectinside a loop creates a new connection every time, so the handler runs several times per message. Connect once, at the top level.
Step 6: Watch out for UnreliableRemoteEvent and rate limits
If you’re using an UnreliableRemoteEvent, missing messages can be normal. The Creator Hub says these messages can be dropped or arrive out of order, aren’t queued when nothing is connected, and are dropped if they’re larger than 1,000 bytes or sent faster than the throttling limit. Use a regular RemoteEvent for anything that must arrive, such as purchases or score changes.
Client-to-server traffic is also rate-limited, so firing a remote every frame from many clients isn’t a safe design. Send updates only when something changes.
If it still doesn’t work
- Test with Start Server plus one or more players in the Test tab, so you can see the server’s and the client’s Output separately.
- Temporarily remove everything except the minimal pair from Step 1. If that works, add your logic back one piece at a time.
- If the server prints “got” but nothing visible happens, the remote works and the problem is in the handler code. For data-saving handlers, check why DataStores fail in Studio.
A good habit: keep all your remotes in one folder in ReplicatedStorage with clear, unique names, and look them up with WaitForChild in every script. Most “not firing” problems disappear once both sides point at the same object.
Related guides
- Fix “Unable to Cast Value to Object” Error in Roblox Studio
- Fix “Attempt to Index Nil With” Errors in Roblox Studio
- Fix “Attempt to Perform Arithmetic on Nil” in Roblox Luau
- Fix “X Is Not a Valid Member of Y” Errors in Roblox Studio
Sources
- Remote events and callbacks – Roblox Creator Hub
- RemoteEvent class reference – Roblox Creator Hub
- Script locations and run context – Roblox Creator Hub
- OnServerEvent not working – Roblox Developer Forum
- Remote Event not being picked up by the Server – Roblox Developer Forum
- Event not firing and no errors? – Roblox Developer Forum
Frequently asked questions
Why is my RemoteEvent not firing in Roblox?
Usually one side's script never runs or never reaches its Connect line. A LocalScript only runs in client containers such as StarterPlayerScripts or StarterGui, and a Script with the default Legacy run context only runs in server containers such as ServerScriptService. Add prints on both sides to see which one stops.
Why does OnServerEvent get the wrong values?
The server handler always receives the Player who fired the event as its first parameter, followed by the values you passed to FireServer. If you write function(amount), amount is actually the Player. Write function(player, amount) instead.
Do I need to wait before firing a RemoteEvent?
For a normal RemoteEvent, no. The Creator Hub says messages are queued while no handler is connected and delivered in order once one connects, though the queue has limits. UnreliableRemoteEvent messages are not queued, so those can be lost if nothing is listening yet.
Why does an argument arrive as nil on the server?
Functions don't cross the network, and an Instance that only exists on the client (for example a part a LocalScript created) arrives as nil on the server. Send data the server can see, such as a number, a string, or a replicated object.
Can one client fire a RemoteEvent to another client?
No. Clients can't talk to each other directly. Fire the event to the server, and have the server call FireClient or FireAllClients to pass the message on.