script.Parent.Touched:connect(function(hit)
	if hit.Parent:FindFirstChild("Humanoid") ~= nil then
		hit.Parent.Humanoid.Health = hit.Parent.Humanoid.Health - 20
		script.Parent:Destroy()
	end
end)

3 comments

0

Get the player using it and have an if statement that checks if it is or isn't that player

0

I can get the player by their UserId but I dont know how to check the UserId with the Player

0

+1 to omit moderation rep loss