hello there, I have ran into a issue in my game if you could help me out that would be great.
after teleporting into the round it teleports me into the void instead.
here is my code:
local roundLength = 30
local intermissionLength = 10
local InRound = game.ReplicatedStorage.InRoumd
local Status = game.ReplicatedStorage.Status
local LobbySpawn = game.Workspace.Lobby.LobbySpawn
local GameSpawn = game.Workspace.GameSpawn
InRound.Changed:Connect(function()
if InRound.Value == true then
for _, player in pairs(game.Players:GetChildren()) do
local char = player.Character
char.HumanoidRootPart.CFrame = GameSpawn.CFrame
end
else
for _, player in pairs(game.Players:GetChildren()) do
local char = player.Character
char.HumanoidRootPart.CFrame = LobbySpawn.CFrame
end
end
end)
local function roundTimer()
while wait() do
for i = intermissionLength, 1, -1 do
InRound.Value = false
wait(1)
Status.Value = “Intermission: “… i …” seconds remaining”
end
for i = roundLength, 1, -1 do
InRound.Value = true
wait(1)
Status.Value = "Game: ".. i .." seconds remaining"
end
end
end
spawn(roundTimer)
here is some other code that might play a part in the issue(currently disabled):
while true do
wait(100000000000)
local num = math.random(1, #game.Players:GetChildren())
game.Players:GetChildren()[num].Character.HumanoidRootPart.CFrame = CFrame.new(339, 274, -74)
end
I dont have a very good knowledge on lua as im still learning, if you can find a fix that would be great, thank you and have a nice day