How to throw an object to the left?

I currently am throwing the ball to a position that is not always left, here is the code and a video

code:

	local Goal = Ball.Handle.Position - Vector3.new(50,0,-20)

Video:

Roblox would not let me upload it because it was to large.

Any advice?

To through a ball this would not be how to do it.

This method wont change where the ball goes when your facing a certain direction. The ball will always land 50 studs south(I think) and 20 studs east(I think). If you zoom out and just rotate the player. The ball will always land in the same spot.

1 Like

You can check the RightVector of a CFrame to figure out which direction is the right, and -CFrame.RightVector would give you the left. Then just multiply it by however many studs. Taking the CFrame of the HumanoidRootPart would give you whatever’s left of the character, unless it’s too tilted in the animation. Something like this should give you an idea of how it works:

local Goal = Ball.Handle.Position - (character.HumanoidRootPart.CFrame.RightVector * 50)
-- change character to whatever the character actually is, that's just a placeholder
4 Likes

Would this work for left and right?

Change it to addition if you want it to work for the right, right now it just does the left. (It gets what’s to the left of the humanoid by getting the opposite direction from the right. There’s no LeftVector property.)

2 Likes