I've been trying to make a camera scriptable in game but it wont do it if i push play but if I use Run it works.
Here's my script
local Dice = script.Parent
local Cam = workspace.CurrentCamera
local Object = game.Workspace.Part
Object.CanCollide = false
Object.Anchored = true
wait(1)
repeat wait()
game.Workspace.CurrentCamera.CameraType = Enum.CameraType.Scriptable
until game.Workspace.CurrentCamera.CameraType == Enum.CameraType.Scriptable
Cam.CFrame = workspace.CamPart.CFrame
Object.Orientation = Vector3.new(0, 0, 90)
Dice.Orientation = Vector3.new(math.random(0, 360), math.random(0, 360), math.random(0, 360))
wait(5)
Dice.Anchored = false
wait(10)
Dice.Anchored = true
wait(0.1)
Object.Position = workspace.Union.Position
wait(0.1)
Cam.CFrame = CFrame.new(Dice.Position + Vector3.new(0,30,0), Dice.Position) -- changes the position of camera above the dice
wait(5) -- You can change it to however long you want it to hover
Cam.CameraType = Enum.CameraType.Custom -- Changes the camera back to player

3 comments
"Play" adds a client to the test-server (your player, character, etc.), whereas "Run" runs server-side code (doesn't join a client to the local test-server).
Is this in a server script or a local script?
its jusst a normal script under a object