Well, I wanted to make it so the start menu of my game has a camera circling a brick in the background. I made it and it works on studio. But online it just stops spinning and nothing happens.
Here's the Play button script:
P = script.Parent
S = script.Parent.Parent.Shop
A = script.Parent.Parent.About
C = script.Parent.Parent.Credits
local Camera = game.Workspace.CurrentCamera
local Focus = Camera.Focus
local Character = game.Players.LocalPlayer
function play()
P.Visible = false
A.Visible = false
C.Visible = false
S.Visible = true
script.Parent.Parent.LocalScript.Disabled = true
Camera.CameraSubject = game.Players.LocalPlayer.Character
Camera.CameraType = ("Custom")
end
script.Parent.MouseButton1Up:connect(play)
And the script that makes it circle the brick.
local target = workspace.BasePlate
local camera = workspace.CurrentCamera
camera.CameraType = Enum.CameraType.Scriptable
camera.CameraSubject = target
--camera.Focus = CFrame.new(target.Position)
local angle = 0
local i = 0
while wait() do
camera.CoordinateFrame = CFrame.new(target.Position) --Start at the position of the part
* CFrame.Angles(0, angle, 0) --Rotate by the angle
* CFrame.new(0, 200, 500) --Move the camera backwards 5 units
--camera.Focus = CFrame.new(target.Position)
angle = angle + math.rad(1)
end
