I am trying to make a model that is moved with AlignPosition not to look up and down, I tried using AlignOrientation (One Attachment) but it did not work
What do I need to do?
I am trying to make a model that is moved with AlignPosition not to look up and down, I tried using AlignOrientation (One Attachment) but it did not work
What do I need to do?
You mean you want to prevent it ever rotating on the x/z?
AlignOrientation with RigidityEnabled toggled on should do the trick.
Edit: An alternative solution if the AlignOrientation doesn’t work is to reset the rotation of the model every frame.
local model = [your model]
game:GetService("RunService").Heartbeat:Connect(function()
local CF = model:GetPivot()
local _, y, _ = CF:ToEulerAnglesXYZ()
model:PivotTo(CFrame.new(CF.Position) * CFrame.Angles(0, y, 0))
end)
Or something along those lines. I can’t access studio right now to test it.