In my script there are many functions. I want to call one function from the other, but the problem is that the function which will be calling another function is above the function it will be calling, and not below it so it is giving me errors. You might be saying to switch the places, but in my script there are a lot of functions, and if I switch the places of the functions then the other functions will have the same problem! Please tell me how I can make this work.
Here is the script:
local Gui = function()
-- Code here
timeLimit() -- It errors here
end
local startRound = function()
-- Code here
Gui()
end
local timeLimit = function()
-- Code here
startRound()
end
game.Players.PlayerAdded:Connect(startRound)
As you can see I am trapped in this situation. I don't know how to make it possible for the top function to be able to call the bottom function. Any type of help is appreciated!

1 comment
im pretty sure you can call the function below anyways, even if it hasnt technically been declared yet. ive never done it, but try and see if it works