Need help to reverse rotation with frame

Hey there!

Second time today about the same issue, as I fixed the previous. I do NOT know anything about how to reverse this script, and make it turn counterclockwise, and there are no good tutorials or answers that I could search.

I’m trying to make this script turn counterclockwise instead of clockwise, but I don’t know what I’m doing. If anyone could help me, that’ll be wonderful!

run.RenderStepped:Connect(function()
    
    local cameraAngle = math.atan2(camera.CFrame.LookVector.Z, camera.CFrame.LookVector.X)
    cameraAngle += math.rad(90)
    script.Parent.Background.Rotation = cameraAngle * 57
    
end)

cameraAngle -= math.rad(90)?

Tried it, and doesn’t work nor even change rotations :frowning:

Oh nvm, I interpreted the code wrong, just add a minus sign to math.atan2(camera.CFrame.LookVector.Z, camera.CFrame.LookVector.X)

Where and or what point in the script? Before math.atan2?

Before math.atan2, OR you can just add the negative sign to the cameraAngle in cameraAngle * 57

1 Like

I’ll see if it works, one moment

So would this be correct?

	script.Parent.Background.Rotation = -cameraAngle * 57
2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.