Hey! I’m making a side scroller game and I’ve been trying to figure out how to prevent the player from being able to move on a certain axis. I’ve tried using BodyVelocity (never had experience with this) but it just seems to halt the player completely.
local Root = player.Character.HumanoidRootPart
local BV = Instance.new("BodyVelocity")
BV.MaxForce = Vector3.new(100000, 100000, 0)
BV.Velocity = Vector3.new(0,0,0)
BV.Parent = Root
I’m trying to lock the player on the ‘Z’ Axis.