I am trying to make a simple laser gun. However, my laser is not moving fast enough. I want it to move like Star Wars lasers – fast, but not so fast that you can’t see it, just a blur.
wait(3)
local part = script.Parent
while true do
part.CFrame = part.CFrame + part.CFrame.lookVector
end
If I try this, it lags and I never see it move. If I add a wait at all, it still doesn’t move fast enough for my liking. How would I make it so my laser moves fast? I need to make sure it moves in the direction it’s facing too.
Then you will need to calculate the trajectory and tween the part with a fixed speed; use raycasting to find the end position and calculate waypoints along the trajectory.