- What do you want to achieve? Keep it simple and clear!
I am making a hole in the wall type of game and I need to make the wall move in a way that pushes the player without him being able to phase through the wall. Also the wall is an union.
While looking on devforum for potential solution (I was using tweens), I’ve came across someone saying that you have to move wall by physics instead of tweens to make player not phase through wall.
- What is the issue? Include screenshots / videos if possible!
All solutions I have tried so far either made the player phase through the wall or affected his movement.
- What solutions have you tried so far? Did you look for solutions on the Developer Hub?
3a) Tweens - It made the player able to phase through the wall.
3b) Tweens + Linear/Body Velocity - When player touched the wall it affected the players movement.
3c) AlignPosition - It didn’t allign its position not even at the maximum possible values(I know it doesn’t work on unions, I’ve welded the union to a part that can be affected via AlignPosition and the part followed tweened part making it tweened and pushed by force at the same time)
3d)LinearVelocity - was not able to set up, even with math.huge values didn’t move the union (probably not union compatible)
3e) Lerp - Didn’t try it out but it works the same way as Tweens, it just increases the CFrame value so it’s not physics and player will still be able to phase through the wall
Does anyone know physics method that works on unions and makes the wall go in 1 direction, push player when colliding with itself and not colliding with anything else ( the last one is probably not needed as the wall shouldn’t colide with anything else than the player characters)?