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

Can someone teach me how to put players who touched a part in a table?

How do I put players who touched a part in a table?

1 answer

✓ Accepted answer

This is one way to do it:

local Players = {}

Part.Touched:Connect(function(hit)
	if hit.Parent:FindFirstChild("Humanoid") then
		local Player = game.Players:GetPlayerFromCharacter(hit.Parent)
		table.insert(Players,Player.Name)
	end
end)

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