Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

How would I implement FireAllClients in a script?

Asked by 7 years ago

How would I use FireAllClients to replace these lines of code?

for i,v in pairs (game.Workspace.Votes:GetChildren())do
        game.Players[v.Name]:FindFirstChild("Ready").FireClient(v, Mode1, Mode2, Mode3, Map1, Map2, Map3)
    end

1 answer

Log in to vote
0
Answered by
Goulstem 8144 Badge of Merit Moderation Voter Administrator Community Moderator
7 years ago
Edited 7 years ago

You would have to place the 'Ready' remote in ReplicatedStorage in order to take advantage of the FireAllClients function.

local remote = game.ReplicatedStorage:FindFirstChild("Ready");

for i,v in pairs (workspace.Votes:GetChildren()) do
    remote:FireAllClients(v,Mode1,Mode2,Mode3,Map1,Map2,Map3);
end
0
I was about to answer this until I thought "Didn't I just see Goul on the site?" Shawnyg 4330 — 7y
0
Thanks DivineObliteration 9 — 7y
Ad

Answer this question