Hey, Im not a great scripter, but i attempted to make a shoot system for a Soocer/Football ball that is attached to the player by Motor6D
The issue is that the ball is going random directions and not flying up even, here is my code:
game.ReplicatedStorage.plrRemotes.shot.OnServerEvent:Connect(function(player)
player.Character.BallSTAD1.BallWeld:Destroy()
player.Character.BallSTAD1.Parent = workspace
local ball = workspace.BallSTAD1
ball.CanCollide = true
game.ReplicatedStorage[player.Name].HasBall.Value = false
wait(0.1)
local bodyVel = Instance.new("BodyVelocity", ball)
bodyVel.MaxForce = Vector3.new(math.huge, math.huge, math.huge)
bodyVel.Velocity = player.Character.HumanoidRootPart.CFrame.LookVector * Vector3.new(0, 200, 100)
end)