New: Nitro Boost our Discord server and receive full donation perks here on the website! Join the Scripting Helpers Discord Server to learn more! You can also Support on Patreon as always.
Still have questions? Join our Discord server and get real time help.
Log in to vote

How to make a server-sided script tell a LocalScript to do something?

Asked by
Valualty 180
11 months ago

Like instead of firing the RemoteEvent for a server script to run something, we do the opposite.

You can use remote events/functions in the same way. I would suggest looking at the Wiki.. SnazzySpider67 51 — 11mo
But with what commands I have to use? Valualty 180 — 11mo
Ok, so it's OnClientEvent and FireClient(), i posted the previous comment right before you fix your comment Valualty 180 — 11mo
u could use remote functions, those are 2 way communication supercoolboy8804 99 — 11mo

1 answer

Log in to vote
Answered by 11 months ago

It appears from your question that you think a RemoteEvent can only fire by a local script asking the server to accomplish a task but not the other way around.

Both remotes (RemoteFunction & RemoteEvent) are capable of having a local script tell the server to accomplish a task and having the server tell a local script to accomplish a task. However, the RemoteEvent is capable of having all clients (the computer running the local script) do a task the server asked for.

Due to your question referring to RemoteEvents specifically, I will give you an example of a RemoteEvent causing the server to tell a local script to accomplish a task:


local Players = game:GetService("Players")

local welcomePlayerEvent ="RemoteEvent")
welcomePlayerEvent.Parent = game.ReplicatedStorage
welcomePlayerEvent.Name = "WelcomePlayerEvent"

local function onPlayerAdded(player)


--Local script

local Players = game:GetService("Players")
local ReplicatedStorage = game:GetService("ReplicatedStorage")

local player = Players.LocalPlayer
local welcomePlayerEvent = ReplicatedStorage:WaitForChild("WelcomePlayerEvent")
local playerGui = player:WaitForChild("PlayerGui")

local welcomeScreen ="ScreenGui")
welcomeScreen.Parent = playerGui
local welcomeMessage ="TextLabel")
welcomeMessage.Size =, 200, 0, 50)
welcomeMessage.Parent = welcomeScreen
welcomeMessage.Visible = false
welcomeMessage.Text = "Welcome to the game!"

local function onWelcomePlayerFired()
    welcomeMessage.Visible = true
    welcomeMessage.Visible = false


The above example is taken directly from the Roblox Developer Hub. If you would like to learn more about Remotes, such as RemoteFunctions yielding and RemoteEvents not yielding but being able to fire all clients, please check this link.


Answer this question