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

I AM TRYING TO CREATE AN INTERMISSION ECT BUT IT ISN'T WORKING AND THERE IS SOMTHING WRONG?


local roundlength = 5
local intermission length = 10
local inround = game.ReplicatedStorage.InRound
local status = game.ReplicatedStorage.status

local lobbySpawn = game.Workspace.GameAreaSpawn



local function RoundTimer()
	while wait() do
		for i = intermissionLength, 1, -1 do
			InRound.value = false
			wait (1)
			status.value = "Intermission: "..i.." secounds left!"
			end
			for i = roundlength, 1, -1 do
				InRound.value = false
				wait (1)
				status.value = "game: "..i.." secounds left!"  
		end
	end
end
spawn(RoundTimer)

15 comments

0

Is there any errors?

0

yes when I run it it doesn't do anything

0

that is not an error lol

0

well can you help me?

0

first things first, you need to edit your question and put your code into a code block

0

And second, what do you want to the script do?

0

I want my script to do an intermission and start the game timer and stuff

0

And is the timer countdown or it doesn't do anything?

0

I don't understand

0

I mean is the Intermission part run or the script doesn't do anything?

0

the script doesn't do anything

0

have you defined the event 'spawn'? that may be why, you've just put the function at the bottom with no event to start it or anything

0

can you show me how because I am very new to scripting

0

Where do you put the script?

0

@Primrose_Studio spawn() is not an event, it a function that allow you to make multi parts of your script run at the same time https://scriptinghelpers.org/questions/16761/spawn-function-what-is-it-what-is-it-used-for-in-what-ways-is-it-different-than-coroutines

1 answer

Try this and make sure the values are IntValues

local roundlength = 5
local intermissionlength = 10
local inround = game.ReplicatedStorage.InRound
local status = game.ReplicatedStorage.status

local lobbySpawn = game.Workspace.GameAreaSpawn



local function RoundTimer()
    while wait() do
        for i = intermissionlength, 1, -1 do
            inround.value = false
            wait (1)
            status.value = "Intermission: "..i.." secounds left!"
            end
            for i = roundlength, 1, -1 do
                inround.value = false
                wait (1)
                status.value = "game: "..i.." secounds left!"  
        end
    end
end
spawn(RoundTimer)

1 comment

0

A good answer explains what you did, why you did it, and where you did it, no matter how small the script may be

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