Code:
player = script.Parent.Parent.Parent
character = player.Character
body = character.Body
link(script.Parent.MouseDown, function(b)
if b == 1 then
local a = math.rad(script.Parent:getAngle()) --it returns degrees, we need radians to use sin and cos
local x = math.cos(a) --get the x and y components of the angle
local y = math.sin(a)
local position = Vec2D(body.Position.x + x * 4, body.Position.y + y * 4) --Position of the ball
local p = create("Circle")
p.Position = position
p.Velocity = Vec2D(x * 20, y * 20) --Give it some velocity
p.Color = Color(200, 0, 0)
p.Parent = game.World
end
end)