Here is my current code


function onTouched(h)
	local h = h.Parent:FindFirstChild("Humanoid")
	if h ~= nil then
		h.Health = 0
	end
end


i would like it to just damage the player not fully kill them please help me.

3 comments

1

h.Health -= 5 will decrease the health by 5

0

also add a debounce so it wont instantly kill

0

it works now thanks