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

can i take one players who touch a part with ( for _, player in pairs) ?

Part.Touched:connect(function()
	for _, player in pairs(game.Players.) --?? what i can add make just select the player who touch the part 
	print("This player touch this part !!")
	end
end)

1 answer

✓ Accepted answer
Part.Touched:connect(function(hit)
	if game.Players:FindFirstChild(hit.Parent.Name) then 
		playerName = hit.Parent.Name
		print(playerName .." has touched this part !!")
	end

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