#why when i only touch once an object it register more than 10 times
1 messages · Page 1 of 1 (latest)
You need a debounce
debounce?
Basically a cooldown
oh
Ill show u rq
** You are now Level 3! **
local debounce = false
local part = script.Parent
part.Touched:Connect(function(hit)
if debounce then return end
local humanoid = hit.Parent:FindFirstChild("Humanoid")
if humanoid then
debounce = true
humanoid.Health = humanoid.Health - 10
debounce = false
end
end)
usually it works like this but you r damaging the plr so lemme fix
that should work for gaining points etc though
oh ok
use humanoid:TakeDamage(10) under debounce = true
** You are now Level 4! **
replace that line