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

Why does FireAllClients not function at all?

Asked by 5 years ago
Edited 5 years ago

The title literally explains everything. I don't know why this isn't working. And no. There are no errors.

SCRIPT:

wait(1)
game.ReplicatedStorage.ChangeStatusEvent:FireAllClients() 

LOCAL SCRIPT:

game.ReplicatedStorage.ChangeStatusEvent.OnClientEvent:Connect(function()
    print(2)
    script.Parent.TextLabel.Text = "INTERMISSION"
    print(2)
end)

Any help would be nice. Thanks!

0
I tested this and it worked for me. For testing, I put the local script in StarterPlayerScripts and the script in ServerScriptService. MegaManSam1 207 — 5y
0
Do you get nothing in your output? MegaManSam1 207 — 5y
0
Nothing. kittonlover101 201 — 5y

2 answers

Log in to vote
1
Answered by 5 years ago

Maybe try to increase the wait? Umm or you could fire each player individually? Its inefficient but it may be a temporary fix.

Server Script

for Index, Player in pairs(game:GetService("Players"):GetChildren()) do
    game.ReplicatedStorage.ChangeStatusEvent:FireClient("Player")
end

Local script can stay the same.

If this doesnt work let me know because it is something else. :)

Ad
Log in to vote
0
Answered by 5 years ago

This could be unrelated, but you seem to have forgotten a parenthesis on line 4 of the local script:

4. print (2
0
Yeah. That is unrelated. On the real script the close bracket is there. kittonlover101 201 — 5y

Answer this question