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

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

Asked by
mmodh1alt -24
4 years ago
Edited 4 years ago

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)
0
Is there any errors? Block_manvn 395 — 4y
0
yes when I run it it doesn't do anything mmodh1alt -24 — 4y
0
that is not an error lol SteamG00B 1633 — 4y
0
well can you help me? mmodh1alt -24 — 4y
View all comments (11 more)
0
first things first, you need to edit your question and put your code into a code block SteamG00B 1633 — 4y
0
And second, what do you want to the script do? Block_manvn 395 — 4y
0
I want my script to do an intermission and start the game timer and stuff mmodh1alt -24 — 4y
0
And is the timer countdown or it doesn't do anything? Block_manvn 395 — 4y
0
I don't understand mmodh1alt -24 — 4y
0
I mean is the Intermission part run or the script doesn't do anything? Block_manvn 395 — 4y
0
the script doesn't do anything mmodh1alt -24 — 4y
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 Primrose_Studio 53 — 4y
0
can you show me how because I am very new to scripting mmodh1alt -24 — 4y
0
Where do you put the script? Block_manvn 395 — 4y
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 Block_manvn 395 — 4y

Closed as Non-Descriptive by youtubemasterWOW, Block_manvn, and moo1210

This question has been closed because its title or content does not adequately describe the problem you are trying to solve.
Please ensure that your question pertains to your actual problem, rather than your attempted solution. That is, you were trying to solve problem X, and you thought solution Y would work, but instead of asking about X when you ran into trouble, you asked about Y.

Why was this question closed?

1 answer

Log in to vote
0
Answered by 4 years ago

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)
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 SteamG00B 1633 — 4y
Ad