I sent you the script so yeah thats all that moves it. I think its just .Velocity
Wait maybe the force just isn’t strong enough, maybe you should use a BodyMover like BodyPosition or something
ok, this is gonna sound really nooby, but what is BodyPosition? Is it .Position, or is it like linearVelocity? Or is it neither?
It’s like a physics constraint that allows you to like have unanchored parts move to different positions smoothly
is it in script or is it an object?
Yeah it’s like an object that you would parent to the ball and then it would immediately take effect, these are its properties
I can’t find it in
Is it just called BodyPosition?
You cant find it because itts Deprecated basically they dont want you using itt anymore because they’ve replcaced it with the AlignPosition constraint which really isnt even that good compared to BodyPosition, all you need to do is go into toolbox and then searxch BodyPosition youll be able to find it there
ok, imma take a break and be back in an hour or so, thanks for your help.
ok so, I tested and something REALLY strange happened. The ball goes to the target position, but usually overshoots the target. and if the player starts moving, the ball REALLY misses the player and also the ball keeps stopping for some reason. (Also if it touches a player, it targets the next player.)
The red player is the target
updated script
local direction = (targetPosition - currentPosition).unit
CSpeed = CSpeed + config.BallAcceleration
clonedBall.BodyPosition.MaxForce = Vector3.new(CSpeed,CSpeed,CSpeed)
clonedBall.BodyPosition.Position = targetPosition
What is CSpeed equal too because the max force must be high so it can reach its target position directly
it starts at 1 and increases by 0.05 each heartbeat, and if it touches the target player it increases by 8%
Yeah no you dont want to do that you want to always have the MaxForce of the bodyposition to be math.huge
, so it has enough force to reach its desired position
wont it go super fast then? I need it to start slow and accelerate.
waaiiit should I adjust the damping for speed?
Well that why your going to need to handle that elsewhere in the script, so basically okay lets say the ball starts at its target position, and we want it to move in a direction; okay so that direction is our current position - the target players position; we can then increase our current position + direction * (SPEED)
ngl, I don’t really understand. So your saying, we move the ball to the player (the target position is the players head), and then the ball increases by direction? in the game, you don’t want to get hit by the ball, but will it just hit everyone instantly?
Nah it wont go to them instantly I mean you could try playing around with the P which is how fast it gets to its target position, but just make sure to have math.huge
for each component of the MaxForce
its going so fast its not even visible except like 1/100 frames
I think I might have encountered an error, I think the script is unable to change the properties of the body position but I’m testing it now
is INF,INF,INF, too much max force? should I change it to like 1,000,000 each?
nah that should be fine but maybe trying doing 10,000