#any way to get all humanoids in workspace?

31 messages · Page 1 of 1 (latest)

nova mortar
#

why would you ever loop through workspace?

#
local function GetHums()
local t = {}
  for _, Plr in game.Players:GetPlayers() do
    table.insert(t, Plr.Character.Humanoid)
  end
  return t
end
prisma spindle
#

im in a scripting game, which means it is not mine. they can hide humanoids anywhere and i want to be able to find them.

clever hare
#

you could also make like a Folder where you put all the Characters in to

prisma spindle
clever hare
#

so youre playing Hide & Seek, in Studio, With Humanoids?

prisma spindle
#

im not in studio, im in a game.

#

but yeah, your correct.

#

should i just list all humanoids at the start and remove + add as i go?

nova mortar
#

what are the requirements for you to win?

#

delete all humanoids?

prisma spindle
#

^

clever hare
#

never use that in a real Game :

for  _, check in workspace:GetDescendants() do
    if check:IsA("Humanoid") then
        print("fund",check)
    end

    task.wait()
end
#

(aslo very slow)

nova mortar
#

then just make sure all of the humanoids are in a folder or something

prisma spindle
prisma spindle
nova mortar
#

you've a terrible game set up

#

then you'll receive terrible scripts to fix it

#

so either overhaul the game or use some awful script that takes years to find all of the humanoids

nova mortar
#

why do you not just make a script to crash the server 🤷‍♂️

prisma spindle
#

i dont feel like talking to an idiot that cant even remember past conversation. i've found my solution.

elfin pelican
nova mortar
nova mortar
elfin pelican
#

And it should take him less than 5 mins then

#

To make a basic for loop

nova mortar
#

he's playing a fucking scripting game, it will take people like that 10 days to make a loop

elfin pelican
#

A scripting game? huhh