How can i make this script not to damage the localplayer, this is a script btw not a localscript, Or not touchable from localplayer!
local buttonPressed = false
script.Parent.Touched:Connect(function(x)
if(x.Parent:FindFirstChild("Humanoid")) and not buttonPressed then
buttonPressed = true
print("Pass2")
x.Parent.Humanoid:TakeDamage(10)
wait(1)
buttonPressed = false
end
end)

5 comments
Not sure if you saw, but this isn't a LocalScript.
oops, didn't read that part. is the script in a tool? if so, use the tool's parent. when equipped, tools are moved into the character.
if this is a script in startercharacterscripts or something, these are also moved into the character, so you can use script.Parent
this script is on a part, this script doesn't work.
dude, you can't mention damaging the local player and then say the script isn't a localscript. also, please don't edit the post whenever someone gets confused over a piece of information. state everything and think about what you're going to post before you hit send. this is becoming much more convoluted because you fail to do that.