Need help with fe gun kit

Hello, I want to make a bullet bounce from a part. It kind of works, but 1 major problem: The bullet’s speed suddenly becomes really fast and starts to ignore parts it touches. Can anyone help me?
Here’s my code:

local function OnRayHit(origin, direction, hitPart, hitPoint, normal, material, segmentVelocity, cosmeticBulletObject, hitData)
	-- This function will be connected to the Caster's "RayHit" event.
	local ShowEffects = ScreenCullingEnabled and (ScreenCulling(hitPoint, ScreenCullingRadius) and (hitPoint - Workspace.CurrentCamera.CFrame.p).Magnitude <= RenderDistance) or (hitPoint - Workspace.CurrentCamera.CFrame.p).Magnitude <= RenderDistance
	local x = math.random(0,100)
	if x <= 100 and not cosmeticBulletObject:FindFirstChild("Bounced") then
		--local CurrentDirection = segmentVelocity.Unit
		local CurrentDirection = segmentVelocity.Unit
		local NewDirection = CurrentDirection - (2 * CurrentDirection:Dot(normal) * normal)
		local n= NewDirection * segmentVelocity.Magnitude

		local bv = Instance.new("BoolValue")
		bv.Name = "Bounced"
		bv.Parent = cosmeticBulletObject

		cosmeticBulletObject.CFrame = cosmeticBulletObject.CFrame + n
		return
	end

I will only provide 1 part of the function.
Any help is appreciated. (Moving the code into another function, etc.)

1 Like

No. That is my only answer, I am a loyal fe gun kit fan
I have never heard of sensei’s gun kit though, I wont switch.

Thanks for nothing.

2 Likes

I don’t see that it’s extremely unoptimized and vulenrable to exploits. I have already made a edited version of it for myself. (Includes bug fixes)
All I did was ask the best solution for my code. You people are going off topic and I feel that you guys are trying to advertise me “sensei’s gun kit”.
My friend has provided me with pictures to show me how horrible the settings look.
Conclusion is: Learning a new gun system is not worth it. I have been already using fe gun kit for years.

1 Like

I deeply apologize for my rude and unacceptable behaviour.