Hello! I made a function here which loads the map but doesn't call the timer function, which is called "restartTimer()". Could anyone tell me why?
I also apologize if this script is messy. It's my most advanced game yet and I've been having a bit of trouble. Also, feel free to link any sources you may use, I'll take a look at them.
Also, no errors come up in the output. If they did, I would have added them here.
Thanks in advance!
-- These are the names of the maps and whether they have been used or not in this current game.
local TremaineTranquility = false -- has it been played yet?
local CliffsideCemetery = false
function roundEnd()
if mapIdentifier == 1 then
if TremaineTranquility == false then
require(game.ReplicatedStorage.Load.TremaineTranquility)("TremaineTranquility") --Loads this map, called "Tremaine Tranquility."
print("Done! Loaded 1 - TremaineTranquility")
TremaineTranquility = true
else
roundEnd()
return
end
elseif mapIdentifier == 2 then
if CliffsideCemetery == false then
require(game.ReplicatedStorage.Load.CliffsideCemetery)("CliffsideCemetery")
print("Done! Loaded 2 - CliffsideCemetery")
CliffsideCemetery = true
else
roundEnd()
return
end
wait(0.1)
for i,v in pairs (game.Players:GetChildren()) do
v.TeamColor = BrickColor.new("Maroon")
v:LoadCharacter()
end
restartTimer()
end
end

6 comments
I don't think you can run the function itself inside of the function.
Where is the funtion? i see when you call it, but i dont see where you declared it and made it an actual function
Line 6 is where he declared it. But, he called the function he's trying to call inside of the function he's trying to create.
I'll try making a new function and then call that new function, but inside of that new function would be the first function. Would that work?
Yeah, that worked. Thanks Killerbrenden for helping me find the source of the issue!
No problem! Put [SOLVED] In your title so people know this question has been solved.