Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

[SOLVED] I need script for a part to damage the player on Touched my code just kills anyone help?

Asked by
Hifived 10
2 years ago
Edited by imKirda 2 years ago

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.

1
h.Health -= 5 will decrease the health by 5 imKirda 4491 — 2y
0
also add a debounce so it wont instantly kill Puppynniko 1059 — 2y
0
it works now thanks Hifived 10 — 2y

Answer this question