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

FireAllClients only firing to one client?

Asked by 2 years ago

I have an Intermission GUI that is activated through a remote event, I used FireAllClients but can't seem to figure out why it's only firing one client. (See image below)

https://imgur.com/a/aBk0vni

Server:

001-- Variables --
002 
003local rep = game:GetService("ReplicatedStorage")
004local water = workspace.Water
005 
006local tp = workspace.TeleportPart
007local tp2 = workspace.TeleportPart2
008 
009local intermission = rep:WaitForChild("Intermission")
010local timer = rep:WaitForChild("Timer")
011 
012local obby = rep:WaitForChild("Obby")
013local map = rep:WaitForChild("LaserTag")
014 
015local TweenService = game:GetService("TweenService")
View all 153 lines...

Client:

01local rep = game:GetService("ReplicatedStorage")
02 
03local intermission = rep:WaitForChild("Intermission")
04local timer = rep:WaitForChild("Timer")
05 
06local playercheck = rep:WaitForChild("PlayerCheck")
07local players = game:GetService("Players")
08 
09local allplayers = players:GetPlayers()
10local tp = rep:WaitForChild("TP")
11 
12local tp2 = rep:WaitForChild("TP2")
13local player = game.Players.LocalPlayer
14 
15timer.OnClientEvent:Connect(function()
View all 43 lines...

Thanks in advance, Scryptio.

0
Can you show where you put the Server and Client scripts in the Explorer? Send the photo throught a link. T3_MasterGamer 2189 — 2y
0
respect to anyone who reads all 200+ lines of code ZeroToH3ro 82 — 2y
0
I don't want to say anything yet, but I think math.random(3) should be floored so it returns a number and not a decimal. chessebuilderman 18 — 2y

1 answer

Log in to vote
0
Answered by
MattVSNNL 620 Moderation Voter
2 years ago

In case of that it only fires to one client! Try looping through all the players and firing to that client!

Here's a example!

1for _, player in pairs(game:GetService("Players"):GetPlayers()) do
2    if player then
3 
4        remoteEvent:FireClient(player) -- Next to the player! Do , and what you wanna send to the client!
5 
6    end
7end
Ad

Answer this question