I need help making a part that will make you take damage if you touch it. Thanks!
function onTouch(hit)
if game.Players:FindFirstChild(hit.Parent.Name) ~= nil then
Character.Humanoid:TakeDamage(10)
script.Parent:Destroy()
end
end
script.Parent.Touched:Connect(onTouch)

1 comment
Thank you!