Please help me I cant figure it out.
01 | local roundLength = 120 |
02 | local intermissionLength = 15 |
03 | local Status = game.ReplicatedStorage.Status |
04 | local inRound = game.ReplicatedStorage.InRound |
05 | local Lobby = game.Workspace.Lobby |
06 | local Roundspawn = game.Workspace.Maps [ "Science Lab" ] .ScienceLabsSpawns.ScienceLabSpawn |
07 |
08 |
09 | inRound.Changed:Connect( function () |
10 | wait( 1 ) |
11 | if inRound.Value = = true then |
12 | for _, player in pairs (game.Players:GetChildren()) do |
13 | local char = player.Character |
14 | char.HumanoidRootPart.CFrame = Roundspawn.CFrame |
15 | end |
You see, the "inRound" value is never false, which is why it keeps on constantly teleporting you.
Fix it by adding
1 | inRound.Value = = false |
under if inRound.Value == true then
then when your round ends, add
1 | inRound.Value = = true |
to where the round ends to restart the loop