Projectile/Bullet Start Delay And Lag

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)

Try using a RemoteEvent to send Data to the Server

i am using remote event to send start position and target position

I solved it by using Clien - Server - Client system. Client generates bullets and send info to the server and server sending info to other clients and they render bullet to. It is working perfect.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.