Is it possible to make a LocalScript execute on all clients from a Server Script?
Is it possible to execute a local script from a normal script???
2 answers
Yes, it is possible. This can be done through RemoteFunctions and RemoteEvents.
An example would be putting a RemoteEvent in the ReplicatedStorage, setting up an event in your LocalScript, and firing it through your server script.
-- LocalScript
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Event = ReplicatedStorage:WaitForChild("RemoteEvent")
Event.OnClientEvent:Connect(function(args)
-- Do something
end)
And then your server script would look something like:
-- Server script
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Event = ReplicatedStorage:WaitForChild("RemoteEvent")
local Args -- Provide your arguments
Event:FireAllClients(args)
You asked to fire the event on all clients, but you can use RemoteEvent:FireClient(player) to fire on a specific player.
You can use a remoteEvent to trigger a signal that will cause all listening scripts to perform a specific action.
You can fire the remoteEvent from the server and on whichever localscript you choose, you can set up a listener to the event and run a function upon firing of the signal.
This discussion is preserved as it was. New answers, comments, and votes are closed.

3 comments
you can make a clone of one local script for each player and parent them to each player.
i tried cloning it to playerscripts it didnt work
Toggle their Disabled property.