You probably removed the last line assigning touchConn to the connection.
Going way back up to the code posted earlier though…
The debounce is getting instantly reset if the toucher part isn’t named “Chao” (he said that means baseplate?) which would explain why it did nothing. If you add a small timeout to this it might work fine.
local function touched(QuemTocou)
if Debounce then return end
if QuemTocou.Name == "Chao" then
Debounce = true
wait(1)
LightBombClone.Anchored = true
Efeito1Clonado.Parent = workspace
Efeito1Clonado.Position = LightBombClone.Position + Vector3.new(0,-20,0)
Efeito2Clonado.AnimationScript.Disabled = false
char.CameraShake.Disabled = false
wait(7)
for y = 0,1,0.1 do
wait(0.1)
LightBombClone.Transparency = y
end
char.CameraShake.Disabled = true
LightBombClone:Destroy()
Efeito1Clonado:Destroy()
Efeito2Clonado:Destroy()
end
end
LightBombClone.Touched:Connect(touched)
this will do the same thing but just without the disconnect messing with the function
there’s multiple ways you could do what your doing. But this should hopefully help you easily.
sorry for any inconvenience
let’s client handle touch event if you want it deals dmg just fire dmg and what it touchs back to server-side then Humanoid.health -= dmg or Humanoid:TakeDamege(dmg) in server-side(you can add db in client-side too bc it deals dmg on client-side so it will deal dmg to every players it’s not same as touch event with db in server-side,touch event with db(server-side) will work only one target but touch event on client will work on all players )
the only problem about this way is if new player joins or player died it won’t work on that player you may fire it again