Game loading at the same time

Hello, I have an issue in my game. When someone joins, there is a 15 second intermission, everything works well. But as soon as a second player (or more) joins, the 15 second intermission restarts for the second player. What i mean is that player 1 and player 2 aren’t synchronised or something like that. Here is a video that demonstrates the problem.

If anyone knows how to fix this i would appreciate it. Thank you.

2 Likes

Create an int value in replicated storage named “Intermission” and update the value from the server, and replicate that value to clients to display

1 Like

So lets say if a player joins the game when the intermission time is 8, they would see 8 and not 15?

1 Like

Yes the server intermission time will be replicated

1 Like

so what do i need to do exactly?

1 Like

Create an int value in replicated storage named “Intermission” and update the value from the server, and replicate that value to clients to display from a localscript

1 Like

I find it to complicated, do you know any tutorial that talks about it?

1 Like

Create a localscript inside the TextLabel that displays your intermission and type these:

local value = game.ReplicatedStorage:WaitForChild("Intermission")
value.Changed:Connect(function()
    script.Parent.Text = value.Value
end)

Now go to your serverscript that is handling the intermissions, change the value in ReplicatedStorage to the intermission value. This way all of the clients will read the same value

1 Like

what if the intermission script is in a gui in starter GUi?

1 Like

Why do you even handle intermission in client?

1 Like

Its in a localscript in a gui in starterGui

1 Like

Can you share the script, you shouldnt be handling your intermissions on the client


local StarterGui = game:GetService("StarterGui")
local CountdownGui = StarterGui.MainGui
local CountdownPlrGui = game.Players.LocalPlayer.PlayerGui.MainGui
--local TeamsPlrGui = game.Players.LocalPlayer.PlayerGui:WaitForChild("Teams")

CountdownGui.ScoreFrame.Timer.Intermission.Visible = true
CountdownPlrGui.ScoreFrame.Timer.Intermission.Visible = true
local time = 15  
for i = 1, 15 do
	wait(1) 
	time = time - 1 
	
	
	CountdownGui.ScoreFrame.Timer.Text = tostring(time) 
	CountdownPlrGui.ScoreFrame.Timer.Text = tostring(time) 

end 

CountdownGui.ScoreFrame.Timer.Intermission.Visible = false
CountdownPlrGui.ScoreFrame.Timer.Intermission.Visible = false

CountdownGui.ScoreFrame.Timer.Teams.Visible = true
CountdownPlrGui.ScoreFrame.Timer.Teams.Visible = true



wait(2.5)

CountdownGui.ScoreFrame.Timer.Teams.Visible = false
CountdownPlrGui.ScoreFrame.Timer.Teams.Visible = false

game.ReplicatedStorage.StartTeamChoosing:FireServer()
--TeamsPlrGui.Enabled = true

That script is very bad, why are you trusting the client with everything? This wont even work for other players. Make a server script that handles the intermission and fires the clients to show up a team selection menu

so I would need to put the script in server script service?

1 Like

No, you can’t just change things inside the startergui, make a remoteevent called something like “PopupTeamSelection” and fireallclients from the server once the intermission is over. And when the client gets fired enable the team selection gui. Also make a value in replicated storage to show time left in intermission to all players

2 Likes