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

Spinning projectile getting stuck in one place?

Asked by 1 year ago

I'm trying to create a projectile and make it spin and it just gets stuck in front of the player :/

function SummonThrowable(throwable,Character)
    local Throw = throwable:Clone()
    local Spin = Throw:WaitForChild("Spin")
    local Aura = Throw:WaitForChild("Aura").Value
    local Orientation = Throw:WaitForChild("Orientation")
    Throw.Orientation = Orientation.Value
    Throw.Orientation = Character:WaitForChild("HumanoidRootPart").Orientation
    Throw.Position = Character:WaitForChild("HumanoidRootPart").Position
    if Spin.Value == true then
        SpinThrowable(Throw)
    end
    Throw.Parent = Character
    local BG = Instance.new("BodyVelocity",Throw)
    BG.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
    BG.Velocity = Character:WaitForChild("HumanoidRootPart").CFrame.lookVector*80
    Throw.Anchored = false
end

function SpinThrowable(throwable)
    if throwable then
        spawn(function()
            repeat wait ()
                throwable.CFrame = throwable.CFrame * CFrame.Angles(0,0.05,0)
            until throwable == nil
        end)
    end
end
0
is the throw non collideable? T3_MasterGamer 2189 — 1y
0
Yes LegoUnicornRoblox 37 — 1y

Answer this question