My moves are extremely buggy and extremely laggy, please help!


I am using the RaycastHitbox Module Raycast Hitbox 4.01: For all your melee needs!
as well as the Lightning Beams Module [Effect] v1.1 Lightning Beams: Seamless, smooth and procedurally animated with beam-like properties

  1. So the first problem is, when used in roblox studio, the output is smooth and expected.
    However when used with multiple people in a game, it is VERY LAGGY, and also buggy.

I made changes in my scripts so it works slightly, but it is still extremely laggy, especially the one that smites once it has touched the floor.

  1. The next problem is that the RaycastParams of the RaycastHitbox module does not work! when i’m in-game and I clicked the smite button it damages me as well as others!

It also increases damage every time it has been used, so after the 5th smite it is basically one shot. (it’s how laggy it is after one smite, you may not see it because i’m in studio but it gives a huge momentary lag spike.)

  1. It is very laggy, I am running all of this through a localscript and used the script to be a damagehandler as well as to fireallclients.

A single smite gives me a HUGE lag spike.

  1. The F move (the one the makes spears rain down) doesn’t work a second time, as shown in this video it doesnt find the nearest person and instead goes somewhere else.

The full scripts:
Serverscript 3/31/2022 3:34PM GMT+8 - - serverscript
Localscript 3/31/2022 3:34PM GMT+8 - - localscript

please note that this is extremely messy as i havent scripted for 6 months now.
there is also no errors shown in the output whatsoever, i’m just having the problem with it’s performance as well as the issue with the f move.

MORE INFORMATION (just stuff i pulled out from studio)

any help is appreciated, I just got off a break and I am so sorry if you cannot read my messy code

alr nvm this, it’s been fixed
i just had to do this


	local Hitbox ="Handle"))
	Hitbox.RaycastParams = rparams
    Hitbox.Visualizer = false
	local connection
	connection = Hitbox.OnHit:Connect(function(hit,hum)

I… just had to disconnect some connections