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.
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?
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