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

How to get names from folder?

I have the players names i want to teleport in a folder and in the folders string value that the value is the name...how can i make them in list to teleport...the only problem is to get the names not to teleport.

1 answer

✓ Accepted answer

You can iterate with a for loop.


for i, namevalue in pairs(NameValuesFolder:GetChildren()) do
	if namevalue:IsA("StringValue") then
		-- second iteration for players
		for j, plr in pairs(game.Players:GetChildren()) do
			if plr.Name == namevalue.Value then
				-- teleport this player
			end
		end
	end
end


1 comment

0

yay thx dude working

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