Body Velocity Problem (SetNetworkOwner)

So basically I am making a sword which so far is going pretty well. But, I ran into a bug recently
I ran into a bug with Body Velocity which will be fine in Studio (Which runs off my computer). But, on Roblox, it was lagging, and etc. If you want to see the difference here it’ll be at the under this paragraph. However, one guy told me to just SetNetworkOwner(nil) it didn’t solve anything and I spent the last hour trying to figure this out

Studio:
https://gyazo.com/e7af91e773e25ce9663beb81a95482e2

Game:
https://gyazo.com/2abadc95beff95bb582cfd12b136b2aa

Code:

elseif ready == false and combo ~= nil then 
		combatready = false
		Time = tick()
		if combo > max then
			ready = true
			cd = false
			return
		end
		local anim = hum:LoadAnimation(game.ServerStorage.Swing["Swing"..combo])
		combo = combo + 1
		anim:Play()
		for i = 4.89,-6.655,-2 do
			Rayz:Cast(i,blade,anim,char,combo)
		end
		local bv = Instance.new("BodyVelocity") --HERE IS THE VELOCITY
		bv.MaxForce = Vector3.new(math.huge,math.huge,math.huge)--HERE IS THE VELOCITY
		bv.Velocity = hrp.CFrame.lookVector*15--HERE IS THE VELOCITY
		bv.Parent = hrp--HERE
		ds:AddItem(bv,.1)
		script.Parent.Remotes.EventHandler:FireClient(plr,anim.Length)
		anim.Stopped:Wait()
		Rayz:End()
		cd = false
		combatready = true
		wait(1)
		if combatready == true then
			if tick() - Time >= 1 then 
				ready = true
				cd = true
				if ready == true or combo == nil then 
					if combo == nil then 
						return 
					end
					if combo > max or combatready == true then
						combo = nil
						wait(.6)
						combo = 1
					end
					Time = tick()
					ready = false
					cd = false
				end
			end
		end
	end```

If anyone could help that would be amazing!

From,
TheSharingan321
1 Like