I'm making an FPS Framework and i'm trying to make a part move along a ray. I know how to make the ray and a part that goes across the entire ray like in the wiki tutorial for "raycasting a laser gun". I'm trying to make a part the moves across the ray from the beginning, to the end of the ray without it being a straight line/laser. Thanks!
local look = loadout.current.Muzzle.CFrame.lookVector local start = loadout.current.Muzzle.CFrame.p local distance = (position - start).magnitude local bullet = Instance.new("Part", game.Workspace) bullet.Name = "bullet" bullet.Material = "Neon" bullet.FormFactor = "Custom" bullet.Anchored = true bullet.CanCollide = false bullet.Transparency = 0.5 bullet.BrickColor = BrickColor.new("Really red") bullet.Reflectance = 0.4 bullet.Size = Vector3.new(0.2, 0.2, distance) bullet.CFrame = CFrame.new(position, start) * CFrame.new(0, 0, -distance/2)