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

How do I make my balls arch with body movers? [closed]

Asked by 5 years ago

I've attempted to make a script that sends a projectile forwards. The script works but the ball fires more straight and doesn't stop moving. I want the ball to fly in a more 'arch' like direction, however, I can't quite get it.

UIS = game:GetService('UserInputService')
Player = game.Players.LocalPlayer
Character = Player.Character


function gen_ball()
    local MAG = 60
    local forw = Vector3.new(0, 0.1, -1)    * MAG

    local ball = Instance.new('Part')
    ball.Anchored = false
    ball.Size = Vector3.new(0.5, 0.5, 0.5)
    ball.Shape = 'Ball'
    ball.BrickColor = BrickColor.new('Dark indigo')
    ball.Material = 'Glass'
    ball.Transparency = 0.1
    ball.CanCollide = false
    ball.CFrame = CFrame.new(Character.HumanoidRootPart.Position + Vector3.new(2, 3, 0))
    ball.Parent = workspace

    local force = Instance.new('BodyForce', ball)
    force.Force = Character.HumanoidRootPart.CFrame:vectorToWorldSpace(forw)

end

UIS.InputBegan:connect(function(input, gameProcessed)
    if input.KeyCode == Enum.KeyCode.E then 
        gen_ball()
    end 
end)

Help would be very much appreciated.

1
Sorry but like the title of this is hilarious. GottaHaveAFunTime 218 — 5y
0
lmao how do I make my balls arch xD theCJarmy7 1293 — 5y

Locked by theCJarmy7, brokenVectors, and User#19524

This question has been locked to preserve its current state and prevent spam and unwanted comments and answers.

Why was this question closed?