roblox-remote-events
Use when implementing client-server communication in Roblox, firing events between LocalScripts and Scripts, passing data across the network boundary, syncing game state, or defending against exploits that abuse RemoteEvents or RemoteFunctions.
By sentinelcore · 447 installs
npx skills add sentinelcore/roblox-skills --skill roblox-remote-events
Source repository · Upstream listing
Roblox Remote Events & Functions
RemoteEvent vs RemoteFunction
Type Direction Returns value? Use when
RemoteEvent Any direction No (fire and forget) Notifying server of player action, broadcasting state
RemoteFunction Client→Server Yes (yields caller) Client needs a result back (e.g. fetch inventory)
UnreliableRemoteEvent Any direction No High frequency updates where dropped packets are fine
Default to RemoteEvent. Avoid server→client RemoteFunction — an exploiter's frozen callback stalls your server thread indefinitely.
Where to Put Remotes
Always store Remotes in ReplicatedStorage . Create them from a server Script that runs before any LocalScript.
Firing Patterns
Client → Server (FireServer)
Server → One Client
Server → All Clients
RemoteFunction (Client Calls, Server Returns)
UnreliableRemoteEvent (High Frequency Sync)
CRITICAL: Server Side Security
The client is hostile. Treat every argument as untrusted input.
Exploit Patterns & Defenses
Exploit What the attacker does Defense
Argument injection Sends unexpected types to crash handler Type check all arguments
Damage amplification Sends amount = math.huge Clamp to sane maximum
Remote spam Fires thousands of times per second Per player cooldown
Spoofed target Sends another player's UserId Server resolves from its own state
Infinite yield Never returns from OnClientEvent callback Avoid server→client RemoteFunction
Duplicate action Replays a valid fire to buy twice Check state / consume token before acting
Quick Reference
Common Mistakes
Mistake Fix
OnServerEvent in a LocalScript Use OnClientEvent on client; OnServerEvent is server only
Remotes in ServerStorage Move to ReplicatedStorage
Trusting payload beyond player identity Validate every field in the payload
Server→client RemoteFunction Use RemoteEvent; frozen client stalls server thread
No WaitForChild in LocalScript Remotes may not exist yet; always use WaitForChild
Multiple OnServerInvoke assignments Only the last assignment wins; keep it in one place
Firing inside tight loop without throttle Use UnreliableRemoteEvent or accumulate delta time