Untitled

mail@pastecode.io avatar
unknown
lua
5 months ago
270 B
2
Indexable
local damageAmount = 20

local function onTouch(hit)
	local character = hit.Parent
	local humanoid = character:FindFirstChild("Humanoid")
	
	if humanoid then
		humanoid.Health = humanoid.Health - damageAmount
	end
end


script.Parent.Touched:Connect(onTouch)
Leave a Comment