You can write your topic however you want, but you need to answer these questions:
What do you want to achieve? Shaking cam
What is the issue? No rotation
What solutions have you tried so far? adding long wait
After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!
while wait(.01) do
A = workspace.Shake.Value
cam = workspace.CurrentCamera
cam.CFrame=cam.CFrame*CFrame.Angles(math.random(-A,A),math.random(-A,A),math.random(-A,A))
print("A")
end
Please do not ask people to write entire scripts or design entire systems for you. If you can’t answer the three questions above, you should probably pick a different category.
Have you done this in a local script? When you do, you should set the CameraType to Scriptable. Your code should look something like this:
local camera = game.Workspace.Canera
A = workspace.Shake.Value
while true do
camera.CameraType = enum.CameraType.Scriptable
camera.CFrame=camera.CFrame*CFrame.Angles(math.random(-A,A),math.random(-A,A),math.random(-A,A))
end
if that’s the case, set the camera variable to workspace.CurrentCamera and you can remove the CameraType. Forgot to add in a wait, you’ll need that in your while loop
A = workspace.Shake.Value
cam = workspace.CurrentCamera
function random()
return math.random(-A,A)/100
end
while wait(.01) do
cam.CFrame *=CFrame.Angles(random(),random(),random())
print("A")
end
or another number, but changing the one that divides to the random number.
If you multiply it by 1000, it would be math.random(-A,A)/1000, the number of A must not have decimal places.