Problem with moving wall

I don’t even know why this is a problem…

So I am trying to create a wall that moves in a straight direction and pushes any player along the way. However, the wall only goes through the player instead of pushing them. How would I fix this?

local wall = script.Parent
local user = wall:WaitForChild("User")
local zoom = wall:WaitForChild("Zoom")
local ts = game:GetService("TweenService")
ti = TweenInfo.new(2)
zoom:Play()
ts:Create(wall, ti, {CFrame = wall.CFrame + (wall.CFrame.LookVector * 500)}):Play()

game:GetService("Debris"):AddItem(wall, 2)

Also I noticed that the wall’s size and speed also matters, I changed the wall to be the height and thickness of a player, and changed the script to wall.CFrame.LookVector * 50 and it worked, but that speed is too slow.

Make the wall move with physics, you can use LinearVelocity

I have tried using LinearVelocity, but that requires me to unanchor the part, which makes the wall fall flat foward and stop. Is there a way to make the part not fall foward?

Instead of trying to use LinearVelocity, why not try and use AlignPosition? I don’t think the wall will fall over if you use that.

How would I use AlignPosition for this?

Edit: I just read the AlignPosition documentation, says it can bring an attachment to a goal position. Maybe it could work

It would be too lengthy to explain everything here, but I’ll give you an overview. AlignPosition basically applies on a force on one attachment to move it to the other one. If you had one attachment in the wall then you could apply force on it to move it to the attachment somewhere else

I tried to get a position in front of the wall to move it to, but I cant get the position. How do I do this

Edit: Nvm I found out my problem was something else and I fixed it thanks!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.