Hey there! I’m currently making a 2.5d platformer game
I’ve ran into an issue where I cant keep the player on a straight path throughout the game, if the player hit A object they are moved out the desired place.
I’ve looked a the dev forums for this issue, But there doesn’t seem to be many solutions, I’ve tried using invisible barriers but those seem impractical and tedious to make for each level in the game.
Please let me know if there are any solutions to this. I’ll be happy to example in more detail if you are still confused.
I myself just set the player’s X or Z position to be stuck on one value. I used a renderstepped function and then if the position has changed, set it back to what you want to lock the value to. This way your character wont jitter around too much because it wont have to set the cframe EVERY renderstep. To make it more smooth you should maybe first do math.round() on the axis of the player and THEN check if it’s not the same as your lock position.
Yeah, true point. Humanoids maintain performance and are quite good when on the client. The issue comes when the humanoid is actually moving. I recommend modifying the control module to change the Humanoid:Move() vector’s X axis to (-torso.Position.X). This would fix your issue entirely.