Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Who can tell what is wrong and fix my script?It's about Round System.

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?

5 comments

0

Can you tell us what is the error? And please format your code next time.

0

F o r m a t t h e s c r i p t

0

Accept my question

0

i mean answer

0

i mean answer

1 answer

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

2 comments

0

OMG It actually work!!!

0

Accept my answer :D

This discussion is preserved as it was. New answers, comments, and votes are closed.