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)
COMMUNITY QUESTION
How do I make it so it doesn't hurt the user that uses it?
0 answers
No public answers were preserved for this question.
This discussion is preserved as it was. New answers, comments, and votes are closed.

3 comments
Get the player using it and have an if statement that checks if it is or isn't that player
I can get the player by their UserId but I dont know how to check the UserId with the Player
+1 to omit moderation rep loss