1.I want to achive no delay or lag when fire the bullet.
2.Bullet is waiting on the air after fired.
robloxapp-20221119-1404372.wmv (1.5 MB)
3.I set the network owner nil it helped to the lag in the air but still did not fixed start delay.
The code that makes bullet and fire bullet
local Bullet = ReplicatedStorage.Bullet:Clone()
Bullet.Parent = game.Workspace
Bullet.Position = OriginPosition
Bullet.CFrame = CFrame.lookAt(OriginPosition,TargetPosition)
local Attachment = Instance.new("Attachment",Bullet)
local AntiGravityForce = Instance.new("VectorForce", Bullet)
AntiGravityForce.Attachment0 = Attachment
AntiGravityForce.RelativeTo = "World"
AntiGravityForce.ApplyAtCenterOfMass = true
AntiGravityForce.Force = Vector3.new(0, Bullet:GetMass()*game.Workspace.Gravity, 0)
local Velocity = Instance.new("LinearVelocity", Bullet)
Velocity.Attachment0 = Attachment
Velocity.MaxForce = math.huge
Velocity.RelativeTo = "World"
Velocity.VectorVelocity = CFrame.new(OriginPosition, TargetPosition).LookVector * BulletSpeed
Fire:Emit(100)
SmokeLeft:Emit(5)
SmokeRight:Emit(5)
SmokeFront:Emit(5)
FireSound:Play()
game.Debris:AddItem(Bullet,10)
Bullet:SetNetworkOwner(nil)