Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to make a projectile go in direction spawner is facing?

Asked by 2 years ago
    local shooter = script.Parent
    local orgin = shooter.Position
    local part = game.ReplicatedStorage.Bullet:Clone()
    part.Parent = script.Parent.Parent
    part.CFrame = CFrame.new(orgin)
    part.CFrame.LookVector = CFrame.new(orgin.X, orgin.Y, orgin.Z)
    wait(1)
    part:Destroy()
    end

The projectile I'm using has its own body velocity which makes it go forwards, and when it gets shot it goes off to one direction no matter which way I look as I can't figure out how to make it spawn with the orientation the spawner has, which would make it go towards the direction it faces like I'd want.

Answer this question