Hi! Basically, I've been creating a game where players have to work together to complete objectives within a set period of time (e.g. open a safe, collect some items etc.)

How would I go about creating a script or variable that kept track of all these objectives? I've created this simple round timer script below (rep was already defined as ReplicatedStorage):

t = 300
repeat
t = t-1
rep.Status.Value = t.." seconds remaining..."
wait(1)
until t == 0
-- Do stuff here
end

I'd ideally like for the script to check whether or not all objectives have been completed - if not, then maybe a gui would pop up, or a simple print message stating the players failed for debugging now would be great! And if all objectives are completed before the timer runs out, for the whole scene to reset and restart the round + objectives.

Any insight is appreciated here! Thank you :D

2 comments

0

idrk if this helps but you may be able to use a bunch of bool values and set them true once an objective is complete

0

Actually, this really helped haha. All I had to do was create a folder in the Workspace for the objectives, add some BoolValues and make constant checks on those per tick! Thanks :D