You can write your topic however you want, but you need to answer these questions:
What do you want to achieve? Keep it simple and clear!
I know this might be a very simple solution, but how can I make the round system check if new player(s) has joined and not have them participate in the round?
What is the issue? Include screenshots / videos if possible!
The game registers anyone who joins. Even if they join right when a round is starting, they will still get teleported.
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
I could trying getting ServerTimeNow with workspace:GetServerTimeNow() and then comparing that with when the player joined?
You can use any time function available on the server to mark when a player has joined and use that to check if they’ve been connected for some specified amount of time.
I think what I’ll do is check for new players like every function. Like the intermission, round, and teleported back. I’m only checking for players during the intermission.
No, wait, or maybe like this:
while true do
if workspace:GetServerTimeNow() - joinTime > 10 then
RoundModule:Intermission(Players, Status, Intermission, IntermissionLength)
RoundModule:StartRound(Players, Status, Arena, TeleportTo)
RoundModule:EndRound(Players, Status, Arena, Target, LobbySpawn, RoundEnded)
task.wait(20)
end
end
This checks if the player has been in the game for more than 10 seconds I guess.
joinTime probably wasn’t set. I don’t know how your RoundModule works so I don’t know what to expect. I also don’t know how a player is excluded from play since I can’t see what Players is or how it’s modified by other code.
local function OnJoin(player: Player)
local JoinedTime = Instance.new("IntValue")
JoinedTime.Name = "JoinedTime"
JoinedTime.Value = clock.time()
JoinedTime.Parent = player
end
game.Players.PlayerAdded:Connect(OnJoin)