How to get player from touch

title is pretty self explanatory. I want to get a value from the player who touched a part

game.Workspace.basic.outlineParticles.Touched:Connect(function(touch)
	if touch.Parent:FindFirstChildOfClass("Humanoid") then
		if touch.Parent.values.hasClothes == true then
		
		
		game.Workspace.basic.default.Highlight.Enabled = true
		
		
		game.Workspace.basic.outlineParticles.TouchEnded:Connect(function()
			game.Workspace.basic.default.Highlight.Enabled = false
		end)
		
		
		end
		end
end)
``

Use GetPlayersFromCharacter()

2 Likes

that was what i did

game.Players:GetPlayerFromCharacter(touch.Parent)

Use
local plr = game.Players:GetPlayersFromCharacter(touch.Parent)

Both of replies above should work.

1 Like

Thanks theres no more error in the console but, the highlight wont turn on