Touched event, extreme lag

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.

LightBomb touches the ground but nothing happens, neither does it lag

if you would like to try just removing the

local touchedConn 

and just have

	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

Everything is normal but the lag is still going on

does it lag when it hits player or the chao?

Player… Thank you for not giving up on me yet

try commenting out the 2 spawn functions above and see the results

look at the conversations above, I already did that

your creating a force field for the player what does that do?

he obviously wants to make an attack that damages people, so he added a forcefield to prevent himself from being hurt

although, he could have added a check to see if the player hit was the one who fired the attack

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

btw touch event with huge size object on server-side always make lag

also don’t foroget to add sanity checks in server-side script bc exploit may hack on client-side to server-side