This is my script:
local laser = Instance.new("Part", game.Workspace)
laser.FormFactor = "Custom"
laser.Size = Vector3.new(0.2, 0.2, 2.6)
laser.CanCollide = false
laser.Anchored = false
laser.CFrame = CFrame.new(fireFromPart.Position, cPos)
local prop = Instance.new("BodyVelocity")
prop.Parent = laser
prop.velocity = (cPos - handle.Position).Unit * velocity
I made a tool that shoots laser beam type things when you cleck the left button. Before I made this part of the script I just cloned the beam from serverstorage but that caused lag problems so I made it so it makes the beam inside the script. Now when I click the shoot button the beam shows up where it is supposed to show up, everything is right except the beam does not move. can anyone find a problem here?
If I change the part position or size when it's already shot it starts moving

4 comments
Is it anchored?
It's obviously not anchored. Although not a real solution, you already have the bullet pointing in the correct direction. Now you can just use lookVector to make it fly straight. prop.velocity = laser.CFrame.lookVector * velocity
Is the beam sticking to your tool or any parts? I think it might be welding itself to something when it's parented to the workspace.
There are no weld scripts in the tool or workspace.