FireAllClients only firing to one client?
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:
003 | local rep = game:GetService( "ReplicatedStorage" ) |
004 | local water = workspace.Water |
006 | local tp = workspace.TeleportPart |
007 | local tp 2 = workspace.TeleportPart 2 |
009 | local intermission = rep:WaitForChild( "Intermission" ) |
010 | local timer = rep:WaitForChild( "Timer" ) |
012 | local obby = rep:WaitForChild( "Obby" ) |
013 | local map = rep:WaitForChild( "LaserTag" ) |
015 | local TweenService = game:GetService( "TweenService" ) |
018 | local players = game:GetService( "Players" ) |
020 | local player = players:GetChildren() |
021 | local playercheck = rep:WaitForChild( "PlayerCheck" ) |
023 | local Teleport = rep:WaitForChild( "TP" ) |
024 | local Teleport 2 = rep:WaitForChild( "TP2" ) |
026 | local sword = rep:WaitForChild( "Sword" ) |
028 | local laser = rep:WaitForChild( "Laser" ) |
029 | local minimumPlayers = 1 |
036 | local info = TweenInfo.new( |
038 | Enum.EasingStyle.Sine, |
039 | Enum.EasingDirection.Out, |
046 | Size = Vector 3. new( 91 , 40 , 91 ); |
049 | local tween = TweenService:Create(part, info, Goals) |
057 | function teleportPlayers() |
058 | Teleport:FireAllClients() |
061 | function teleportPlayers 2 () |
062 | Teleport 2 :FireAllClients() |
066 | for i, v in pairs (game.Players:GetPlayers()) do |
067 | local newLaser = laser:Clone() |
068 | newLaser.Parent = v.Backpack |
073 | for i, v in pairs (game.Players:GetPlayers()) do |
074 | local newSword = sword:Clone() |
075 | newSword.Parent = v.Backpack |
079 | function removeSword() |
080 | for i, v in pairs (game.Players:GetPlayers()) do |
081 | if v.Backpack.Sword then |
082 | v.Backpack.Sword:Destroy() |
083 | elseif v.Character.Sword then |
084 | v.Character.Sword:Destroy() |
089 | function removeLaser() |
090 | for i, v in pairs (game.Players:GetPlayers()) do |
091 | if v.Backpack.Laser then |
092 | v.Backpack.Laser:Destroy() |
093 | elseif v.Character.Laser then |
094 | v.Character.Laser:Destroy() |
102 | if #players:GetPlayers() > = minimumPlayers then |
104 | local num = math.random( 3 ) |
106 | print ( "Game chosen: Sword Fight" ) |
107 | intermission:FireAllClients() |
109 | timer:FireAllClients() |
115 | print ( "Game chosen: Flood Escape" ) |
116 | intermission:FireAllClients() |
117 | local newObby = obby:Clone() |
118 | newObby.Parent = workspace |
119 | newObby:MoveTo(Vector 3. new( 2.5 , 95.7 , - 9.5 )) |
121 | timer:FireAllClients() |
123 | water.Transparency = 0.3 |
124 | water.CanTouch = true |
126 | print ( "Water rising" ) |
128 | water.Transparency = 1 |
129 | water.CanTouch = false |
130 | water.Size = Vector 3. new( 91 , 1 , 92 ) |
134 | print ( "Game chosen: Laser Tag" ) |
135 | intermission:FireAllClients() |
136 | local newmap = map:Clone() |
137 | newmap.Parent = workspace |
138 | newmap:MoveTo(Vector 3. new( 4.664 , 81.7 , 2.043 )) |
143 | timer:FireAllClients() |
151 | playercheck:FireAllClients() |
Client:
01 | local rep = game:GetService( "ReplicatedStorage" ) |
03 | local intermission = rep:WaitForChild( "Intermission" ) |
04 | local timer = rep:WaitForChild( "Timer" ) |
06 | local playercheck = rep:WaitForChild( "PlayerCheck" ) |
07 | local players = game:GetService( "Players" ) |
09 | local allplayers = players:GetPlayers() |
10 | local tp = rep:WaitForChild( "TP" ) |
12 | local tp 2 = rep:WaitForChild( "TP2" ) |
13 | local player = game.Players.LocalPlayer |
15 | timer.OnClientEvent:Connect( function () |
16 | for count = 60 , 0 , - 1 do |
17 | script.Parent.Text = count |
22 | intermission.OnClientEvent:Connect( function () |
23 | for count = 30 , 0 , - 1 do |
24 | script.Parent.Text = "Intermission: " ..count |
29 | playercheck.OnClientEvent:Connect( function () |
30 | script.Parent.Text = "Not enough players" |
33 | tp 2. OnClientEvent:Connect( function () |
34 | for_, players = pairs (game.Players:GetChildren()) do |
35 | player.Character.HumanoidRootPart.CFrame = workspace.TeleportPart 2. CFrame |
39 | tp.OnClientEvent:Connect( function () |
40 | for_, players = pairs (game.Players:GetChildren()) do |
41 | player.Character.HumanoidRootPart.CFrame = workspace.TeleportPart.CFrame |
Thanks in advance, Scryptio.