Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How would I find the players who didn't die during the "event"(wait time)?

Asked by
ElBamino 153
3 years ago

Hey scriptinghelpers, I'm working on a script for random events. I was wondering how I would find the players who didn't die during the "event"? I can't seem to find anything about this online or any type of sample code so I thought I might as well ask. I'm trying to find the players didn't die during the event. This is all the same map so there's not like teleporting I can check. I don't really know how else to word this. Thank you for your time and help! I appreciate it. I'm only here to learn!

This is a Script in ServerScriptStorage

local folder = game.ReplicatedStorage.Folder
local rando = Random.new()
local events = folder:GetChildren()
local model = events[rando:NextInteger(1,#events)]
while true do
    wait(300)
    local event = model:Clone()
    event.Parent = game.Workspace
    wait(60)--this is the event happening
    --this is where I would like to find who didn't die during the wait aka event
    event:Destroy()
end

I actually put more work into the events than I did this script lol. Don't mind how simple it is, it works that's all I need! Thanks again in advance.

0
You could Use a coroutine I guess If you want I could post the code but I think you'd like it more if you solved it with the Docs ayuu1234 0 — 3y

Answer this question