Hello!
So basically, I am having an issue rotating a CFrame 180º on the Y axis. I want it to kind of “snap” to the part, however it’s returning Position cannot be assigned to
in the output.
Here’s the snippet causing the issue:
local cframe = CFrame.new(smallest) -- smallest is a vector3
if smallest == walls.wallN or smallest == walls.WallS then
cframe = CFrame.Angles(0, math.rad(180), 0) -- Set the angle, BUT it moves it to 0,0,0
cframe.Position = smallest -- causing the issue, returning the error.
end
model:SetPrimaryPartCFrame(cframe)
I’ve also tried using :ToWorldSpace()
but it seems not to affect anything.