Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Whats the opposite of append?

So often when you want to check what's outside of something you use append. But I am wondering how you can check what's inside of something. Example

game.Players

I can't be sure what will be in there because players have random names. But is there a way to for example print all the players that are inside players?

2 comments

0

This is a really bad question ik. One way i might now is to use getchildren. But I don't understand how to use getchildren.

0

depend

1 answer

Sure you can use getchildren for one.

That would look something like this

for i,v in pairs(workspace.Model:GetChildren())do
	print(v)
end

for players you should use

for i,v in pairs(Players:GetPlayers())do
	print(v)
end--this does the same thing :)

This discussion is preserved as it was. New answers, comments, and votes are closed.