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

Fireball not shooting forward, only dropping down, why Is that?

Asked by 2 years ago

So I made a ability for a morph (The ability Is a tool with no handle Inside of the morph), the ability Is to summon a massive white fireball that after 1.40 seconds (In roblox time) causes the user who used the ability to force the fireball to smash Itself Into the ground, basically It works, the problem however Is that when 1.40 seconds (In roblox time) has passed and the user Is about to smash the fireball, the fireball only drops down, I want It to drop down, but also move as well

Script

local Tool = script.Parent
local Troll = Tool.Parent
local Animator = Troll.Humanoid:FindFirstChild("Animator")
local SummonAnimation = Troll:WaitForChild("Summon ball")
local Debounce = false

Tool.Activated:Connect(function()
    if not Debounce then
        Debounce = true
        Troll.Torso.Anchored = true
        local AnimationTrack = Animator:LoadAnimation(SummonAnimation)
        AnimationTrack:Play()
        wait(0.30)
        Troll:WaitForChild("Ball Summon"):Play()
        local MassiveBall = Instance.new("Part")
        MassiveBall.Parent = game.Workspace
        MassiveBall.Position = Troll.Torso.Position
        MassiveBall.Size = Vector3.new(1,1,1)
        MassiveBall.Shape = Enum.PartType.Ball
        MassiveBall.CanCollide = false
        MassiveBall.CastShadow = false
        MassiveBall.Material = Enum.Material.Neon
        MassiveBall.BrickColor = BrickColor.White()
        MassiveBall.Anchored = true
        for i=0, 50 do
            MassiveBall.CFrame = MassiveBall.CFrame+Vector3.new(0,1,0)
            MassiveBall.Size = MassiveBall.Size+Vector3.new(1,0,0)
            wait()
        end
        wait(1.40)
        local StudsPerFrame = -30
        for i=0, 30 do
            MassiveBall.CFrame = MassiveBall.CFrame+Vector3.new(0,1,MassiveBall.CFrame.LookVector*StudsPerFrame)
            wait()
        end
        game:GetService("Debris"):AddItem(MassiveBall,0)
        wait(1)
        Troll.Torso.Anchored = false
        Debounce = false
    end
end)

Answer this question