Laser particle from rifle floats short time before moving

I have this laser rifle that shoots laser rounds that when touched damage a player. I move the particle by setting its assemblyvelocity. However, when its created, it floats for a short time first before moving. How do I make this not happen, and the particle instantly move? Here is a video of what is happening:

Also, this is (part of) my code that creates the particle. there are no task.waits or other yields before its created. The CFrame of the particle (direction) is calculated beforehand.

local Projectile = Instance.new('Part')
	game.Debris:AddItem(Projectile,Configuration.BulletTime)
	Projectile.Name = "Projectile"
	Projectile.Color = Configuration.Color
	Projectile.Transparency = 0
	Projectile.Material = Enum.Material.Neon
	Projectile.Size = Vector3.new(.15,.15,2)
	Projectile.CanCollide = false
	Projectile.CFrame = Direction
	local Attachment = Instance.new('Attachment')
	Attachment.Parent = Projectile
	local NoGrav = Instance.new('BodyForce')
	NoGrav.Force = Vector3.new(0,Projectile:GetMass() * workspace.Gravity,0) 
	NoGrav.Parent = Projectile
	Projectile.AssemblyLinearVelocity = Projectile.CFrame.LookVector * Configuration.Force
	local Light = Instance.new('PointLight')
	Light.Brightness = 6.9
	Light.Color = Configuration.Color
	Light.Range = 4
	Light.Shadows = true
	Light.Parent = Projectile
	Projectile.Parent = workspace
	Projectile.Touched:Connect(function(prt) LaserTouched(Projectile,prt) end)
2 Likes

This could be an issue with Network Ownership.
Check it out!
The freezing might be when the projectile transfers owners.

1 Like

Thanks! I fixed it by setting the network owner of the particle to the player! This is how the code looks at the end now:

Light.Parent = Projectile
Projectile.Parent = workspace
Projectile:SetNetworkOwner(Player)
Projectile.Touched:Connect(function(prt) LaserTouched(Projectile,prt) end)
1 Like

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