Please help me this is actually frying my brain and I cant stand it Ok so, I have a boss fight thing that you have to try and kill "zombies" and the boss before an invisible timer runs out (nobody sees the timer), Im using bindable events and BoolValues to help do this.
--just pretend it will always be infection
wait(10)
while true do
math.random(1,3)
if math.random(1,3) == 1 then
game.ServerScriptService.eventos.LAVA_AH.Disabled = false
print("lava")
wait(66)
game.ServerScriptService.eventos.LAVA_AH.Disabled = true
print("lava over")
script.Disabled = true
elseif math.random(1,3) == 2 then
game.ServerScriptService.eventos.NUKE_AH.Disabled = false
print("nuke")
wait(131)
game.ServerScriptService.eventos.NUKE_AH.Disabled = true
print("nuke OVER")
script.Disabled = true
elseif math.random(1,3) == 3 then
game.ServerScriptService.eventos.INFECTION_AH.Disabled = false
wait(230) game.ReplicatedStorage.WHENAVALISTRUE.Event:Connect(function(winorlose) --bindableEvent
if winorlose == "loss" then
end
end)
end
end
the script that is firing the event:
game.ReplicatedStorage.booleans.bacLose.Changed:Connect(function()
if game.ReplicatedStorage.booleans.bacLose.Value == true then
game.ReplicatedStorage.WHENAVALISTRUE:Fire("loss") --WHENAVALISTRUE is the BindableEvent
end --ill add other win Ifs later but this is just for now
end)
I havent even tested it out yet because I cant
Summary: If one of these two values have not yet been enabled even after 230 seconds have passed remove everything.

4 comments
I'm sorry, what is the problem?
Oh wait
Maybe try making a wait() and after the wait make an if statement that checks if the zombies and boss are dead..?
@ZIRFAL3 Ill make a wait in a seperate script