Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Why does FireAllClients not function at all?

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!

3 comments

0

I tested this and it worked for me. For testing, I put the local script in StarterPlayerScripts and the script in ServerScriptService.

0

Do you get nothing in your output?

0

Nothing.

2 answers

✓ Accepted answer

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. :)

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

4. print (2

1 comment

0

Yeah. That is unrelated. On the real script the close bracket is there.

This discussion is preserved as it was. New answers, comments, and votes are closed.