So first of all i wanted to try putting in my game the Round System.So i watched many videos on how to do this but it was one video i found that not even a single person got any errors.So i got some scripts from their and it didn t work.
If someone can tell me if it is me or Roblox because one time i had the same problem and i waited one day and then it's actually worked the script that i made.
If you want to know the video here it is: https://www.youtube.com/watch?v=ESzmiC_AzLw
Besides just for you to look if you find any mistakes
My script:local roundLenght = 5 local intermissionLenght = 10 local InRound = game.ReplicatedStorage.InRound local Status = game.ReplicatedStorage.Status
local LobbySpawn = game.Workspace.LobbySpawn local GameAreaSpawn = game.Workspace.GameAreaSpawn
InRound.Changed:Connect(function() if InRound.Value == true then for _, player in pairs(game.Players:GetChildren()) do local char = player.Character char.HumanoidRootPart.CFrame = GameAreaSpawn.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 = intermissionLenght, 0, -1 do InRound.Value = false wait(1) Status.Value = "Intermission: ".. i .." seconds left!" end for i = roundLenght, 0, -1, do InRound.Value = true wait(1) Status.Value = "Game: ".. i .." seconds left!" end end end
spawn(roundTimer)
My LocalScript:
local Status = game.ReplicatedStorage.Status local TimerDisplay = script.Parent.TimerDisplay
Status.Changed:Connect(function() TimerDisplay.Text = Status.Value end)
If you find something wrong can you fix it for me and tell what was wrong there please?
I pasted the script inside Roblox Studio and i saw a problem At line 12: (On the web not your script) You wrote:
roundLenght, 0, -1, do
Change that to:
roundLenght, 0, -1 do
I will edit if i saw some more error
Hope this will help :D