Hi, I’m making a backroom style horror game. The game is almost done, but there’s only one level left to finish. How do you think I should do this? Do you think the level finishing I am currently using is enough or is there something I need to improve or add? Please share your ideas…
NextLevel function:
function module.NextLevel(WantedLevel)
print("Next Level!")
local OldLevel = game.Workspace.LoadedLevel:FindFirstChildOfClass("Folder")
if not OldLevel then return end
if not SS.Levels:FindFirstChild("Level"..WantedLevel) then
warn("Level Not Found")
for i,v in pairs(Player:GetChildren()) do
v:Kick("ERR _7: Level Is Not Found. Wanted Level Parameter is: "..WantedLevel..". Please Report this to Developers in Discord. Thanks.")
end
return
end
RS.Configuration:SetAttribute("CurrentLevel", WantedLevel)
for i,v in pairs(Player:GetChildren()) do
if v:IsA("Player") then
local PlayerGUI = v.PlayerGui
local LoadingScreen = game.ServerStorage.LoadingScreen:Clone()
LoadingScreen.Parent = v.PlayerGui
print(LoadingScreen.Parent)
end
end
task.wait(11)
module.StartGame()
end
And StartGame Function:
function module.StartGame()
local CurrentLevel = RS.Configuration:GetAttribute("CurrentLevel")
local Level = game.ServerStorage.Levels:FindFirstChild("Level"..CurrentLevel)
CheckOldLevel()
if not Level then
warn("Level Not Found")
for i,v in pairs(Player:GetChildren()) do
v:Kick("ERROR: Level Is Not Found. Current Level Parameter is: "..CurrentLevel..". Please Report this to Developers in Discord. Thanks.")
end
return
end
local LevelClone = Level:Clone()
LevelClone.Parent = workspace.LoadedLevel
for i,v in pairs(Player:GetChildren()) do
if v.ClassName == "Player" then
ReSpawnCharacterWithOutLives(v)
end
end
RegisterCharacterEntrys(false)
end
In Game Video:
External Media