Please help i dont want to have bad code!
So basically i want the part to turn toward's the camera, It does but the orientation isn't changed at all, For it to be fixed i have to execute this 2 time's and i know that's a bad practice!
My guess is the code isn't updating the part's property's fast enough so the part where it says "m.Orientation.Y" isn't updated, I was thinking to put a wait() but i know that's a bad practice i tried to make this super simple sorry if it's still hard to read.
local m = workspace.monitor
for i = 1,2 do
--Make part look at camera
m.CFrame = CFrame.new(workspace.CurrentCamera.CFrame.Position,m.Position)
--Make part go 2 studs in front of camera
m.Position = workspace.CurrentCamera.CFrame.Position + workspace.CurrentCamera.CFrame.LookVector * 2
-- Make the part keep it's Y coordinate so it isn't changed idk why it changes help?
m.Position = Vector3.new(m.Position.X,9.87,m.Position.Z)
--This is the part where it needs to be executed twice my guess is the code is going too fast?
m.Orientation = Vector3.new(-90,m.Orientation.Y ,m.Orientation.Z)
end

1 comment
If you want to make is faster, use RunService