I'm trying to make a part that orients itself to face the camera at all times, and I could use some help with this.
local part = game.Workspace.InnerRing
local camera = game.Workspace.Camera
game:GetService("RunService").RenderStepped:connect(function()
local campos = camera.CFrame.p
part.CFrame = CFrame.Angles(math.atan2(campos.Z,campos.Y),0,math.atan2(campos.Z,campos.X))
wait()
end)
It works fine if I leave the y and z values at zero, so that the x rotation matches my camera perfectly, but when I start to plug in values for z or y, the whole thing becomes wonky.
What am I doing wrong?

1 comment
Just realized that you are trying to not use Y give me a second.