Greetings! So I came here to ask questions regarding a problem I’ve been having. Okay, so, basically what happens is I set the position of a ball object to a brick’s position on the ball return (this is for a bowling game) so with that being said, I also use BodyVelocity and modify it’s MaxForce/Velocity properties to make the ball roll once it’s at the ball return, but if the player is throwing the ball, then I disable the BodyVelocity so it uses regular physics. With all that being said, sometimes the ball never appears on the ball rack, but after investigating, it appears actually underneath the ball rack, and somehow stays in it’s fixed position. I’m not sure if this is caused because BodyVelocity is deprecated, and shouldn’t be used anymore? (If that’s a true statement, please provide me with an alternative, that’d be great!) but if you wouldn’t expect that to be causing the problem, other insights on this would be appreciated as well. All I do is I set the position of the ball to the part’s position, and since it’s position, it automatically should position itself on top of an object if there is any collision, so that shouldn’t be an issue?
More than likely it is a logic error in your code which u do not provide. Please do. (eg. If u r absolutely certain that it is not a problem with your code, then it definitely is: You are not checking your assumptions. One of which is obviously wrong. Blaming Roblox is a dead-end)
Meanwhile, why not Position your Ball at the Bricks Position plus the offset of where u actually want it to be? (Actually changing your code in anyway, no matter how frivolous, even adding a print statement, usually leads to an “Aw ha” moment.
Thanks for the reply! I thought for sure all the BodyMovers were declared deprecated as the new physics movers were released. But if what you said is true (not saying it isn’t true), that would pinpoint my problem to some other weird reason, such as maybe the ball has some weird RotVelocity as it is placed on the brick that it spins and glitches under the rack? I’d have to look into this, as it happens rarely, but it does still occur I believe.
Any other insights or information appreciated. Thanks!
Thanks for the reply, BJ! Well, I’m certain it isn’t a code problem, as the code remains the same under any circumstance:
ball.Position = ballreturn.BallSpawn.Position
I’d have to make an assumption that the reason this could happen (it happens extremely rarely, atleast I think for me) that the ball perhaps has some RotVelocity or maybe regular Velocity applied to it that makes it glitch out as I modify the BodyVelocity’s properties. I’d have to experiment with these. Thanks!
Then print() it’s RotVelocity. print() ballreturn. print() BallSpawn.
Think of every assumption that you are making. One, or more is wrong.
I am a very bad programmer, so have lots of experience debugging. An interviewer once asked me, what my strong suit was. I said, debugging. I did not get the job. Instead say, I’m excellent at modifying code. (I asked for a second interview. I juggled for them, and worked at Radical Entertainment for 3 years)
I was aware that it would position the object above anything colliding with the object, but I never heard of it potentially putting it under something. I’ll definitely check that out.
Well, I’m not sure if there’s anything else you guys could tell me, as I made some changes to the code (using cframe, positioning up slightly above the spawning point) and somehow this problem still persists. I’m not sure if I shouldn’t be using BodyVelocity at all, which perhaps could be the key issue? I have no idea. I don’t even see the ball when it happens, it appears somewhere underneath the ball return… blows me away.