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

ummm my script keeps teleporting me constantly each time only when it is intermission?

Asked by 4 years ago

Please help me I cant figure it out.

01local roundLength = 120
02local intermissionLength = 15
03local Status = game.ReplicatedStorage.Status
04local inRound = game.ReplicatedStorage.InRound
05local Lobby = game.Workspace.Lobby
06local Roundspawn = game.Workspace.Maps["Science Lab"].ScienceLabsSpawns.ScienceLabSpawn
07 
08 
09inRound.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
View all 46 lines...
0
Use GetPropertyChangedSignal() instead of Changed. Changed event checks for ANY changes. Dovydas1118 1495 — 4y

1 answer

Log in to vote
1
Answered by 4 years ago
Edited 4 years ago

You see, the "inRound" value is never false, which is why it keeps on constantly teleporting you.

Fix it by adding

1inRound.Value == false

under if inRound.Value == true then

then when your round ends, add

1inRound.Value == true

to where the round ends to restart the loop

Ad

Answer this question