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.
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.
This discussion is preserved as it was. New answers, comments, and votes are closed.
3 comments
h.Health -= 5 will decrease the health by 5
also add a debounce so it wont instantly kill
it works now thanks