FireServer can only be called from the clientin Roblox Luau: what it means and how to fix it
What it means
A server Script called FireServer on a RemoteEvent. FireServer sends a message from a player's device to the server, so only a LocalScript can call it.
The smallest script that triggers it
-- Script in ServerScriptService
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local remote = ReplicatedStorage:WaitForChild("ShowMessage")
remote:FireServer("Round started")
The fix
-- Script in ServerScriptService
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local remote = ReplicatedStorage:WaitForChild("ShowMessage")
remote:FireAllClients("Round started")
The server talks to players with FireClient (one player) or FireAllClients (everyone). FireServer is the opposite direction.
Common causes
- The code is in a Script when it was meant to be in a LocalScript.
- The server wants to message players and should use FireClient or FireAllClients.
- Code was copied from a LocalScript tutorial into a server Script.
Practice this until it sticks
A Deep Dive on RemoteEvents, client and server: 5-minute lessons, each with a quiz. What you miss comes back in the next module. One Deep Dive a day is free. No card.