Hello to the community!

I am creating a custom physics system for players and parts and i want to make it so player characters can still collide with parts (collidable objects) but if they are already in the part - the only way to know this is if they touch the centre of the part - then they wouldn't get pushed out, like how the default roblox physics engine does push them out. (by the way, the only reasonable way a player would get stuck in a block without nocliping hax is if the block was teleported to them or created at the character's position or something like that, which is what i am doing in the game). I have searched for this and found nothing, and i tried all I could... nothing worked, i know how to detect a player being in the centre and i know theres enough time to prevent the player character from being pushed out before a script can disable it when the script is triggered, but i just dont know how to stop the character from physically moving like crazy when stuck inside the part other than moving. Sorry i forgot to mention, i want them to still be able to walk so they could get out of the block.

Also dont worry, i can just detect when a character gets out of the part before making it collidable again so it doesn't push them out even after not touching the centre but are still in the block, so all i need is for a way to disable this normal physics thing.

Ooh also making the part un-collidable when a player touches the centre wont work, because i want other player's to be able to collide with it even if another player is not able to collide with it and can walk around inside the part.

Also last thing, i know i could probably just make the part non collidable client side but i don't want to go that route for my own reasons. I want it to act as a server side physics thing. If there's absolutely no way to do this, then i guess i can do the client side non collidable thing but please if there is a way, then tell me.

All help is appreciated thank you.