How would I move the ball from behind the character:
To in-front of the characters root part while maintaining the X and Z axis of the ball ( not sure if I worded it right ):
How would I move the ball from behind the character:
To in-front of the characters root part while maintaining the X and Z axis of the ball ( not sure if I worded it right ):
First of all, we cannot both move the ball in front of the player and preserve X- and Z-axis position values. Maintaining X and Z means we can’t move the ball at all. How are we supposed to move it in front of the player if we can’t move the ball?
In case you end up not caring about preserving X and Z but still need help moving the ball in front of the player, try:
(I’ll be assuming that we have a variable named player
that’s a reference to the player’s Player
object)
player.Character.HumanoidRootPart.CFrame.LookVector
, which is a unit vector that points in the direction of forward relative to HumanoidRootPart
.ballPos
.ball.Position = Vector3.new(
ballPos.X,
ballYPositionFromEarlier,
ballPos.Z
)