✓ Accepted answer
The problem is that when you're handling something that you want to happen for the player only you should be using a local script, not to mention that the code you provided/written was incorrect. You should be manipulating the CFrame/CameraSubject of the CurrentCamera (an object located in the workspace).
wait(.25)
local CurrentCamera = workspace.CurrentCamera
local Part = workspace.CameraPart
CurrentCamera.CameraType = Enum.CameraType.Scriptable
CurrentCamera.CFrame = Part.CFrame
In the code above we have two variables declared, one for the CurrentCamera and another for a part. We change two things of the CurrentCamera, one for the CameraType property and another for changing the CFrame of the CurrentCamera. We change the CurrentCamera to scriptable and then afterwards we change the CurrentCamera's CFrame to the Part's CFrame. That's about it.
If you want it so the Camera to be reverted back to normal, change the CameraType to
CurrentCamera.CameraType = Enum.CameraType.Custom
since custom is the CameraType by default.
5 comments
Oh and another thing is that you can either put this local script in StarterGui or StarterPlayerScripts.
Thank you so much!
One question, how do I make the camera move once the leaderstats value changes?
Like if the leaderstats is at 1, then the camera stays at one position or CFrame, if the leaderstats is at 2, then it is at another position or CFrame.
Do a conditional statement that checks the value of the integer.