The video to review the problem:
The main menu code:
local player = game:GetService("Players")
local lplr = player.LocalPlayer
local plrgui = lplr.PlayerGui
local menu = plrgui:WaitForChild("Menu")
local playbutton = menu.Play
local cheatsbutton = menu.EnableCheats
local gradient = cheatsbutton.spin
local activatedcheats = false
local spin = false
local hotbar = plrgui.CustomInventory.HotBar
hotbar.Position = UDim2.new(0,0,1.2,0)
local camera = workspace.CurrentCamera
local menucamera = workspace:WaitForChild("MenuCamera")
camera.CameraType = Enum.CameraType.Scriptable
camera.CFrame = menucamera.CFrame
local menumusic = Instance.new("Sound")
menumusic.Parent = workspace
menumusic.Volume = 1
menumusic.SoundId = "rbxassetid://9045766377"
menumusic:Play()
local sg = game:GetService("StarterGui")
sg:SetCoreGuiEnabled(Enum.CoreGuiType.Backpack, false)
sg:SetCoreGuiEnabled(Enum.CoreGuiType.Health, false)
local ts = game:GetService("TweenService")
local ti = TweenInfo.new(5)
local ti2 = TweenInfo.new(1, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut)
playbutton.MouseButton1Click:Once(function()
camera.CameraType = Enum.CameraType.Orbital
menu.Enabled = false
ts:Create(menumusic, ti, {Volume = 0}):Play()
ts:Create(hotbar, ti2, {Position = UDim2.new(0, 0, 0.93, 0)}):Play()
hotbar.Parent.HudScript.Enabled = true
task.wait(5)
menumusic:Destroy()
end)
cheatsbutton.MouseButton1Click:Connect(function()
if activatedcheats == false then
activatedcheats = true
cheatsbutton.TextColor3 = Color3.fromRGB(255,255,255)
gradient.Enabled = true
spin = true
elseif activatedcheats == true then
activatedcheats = false
cheatsbutton.TextColor3 = Color3.fromRGB(140,140,140)
gradient.Enabled = false
spin = false
end
end)
local rs = game:GetService("RunService")
local function spingradient()
rs.Heartbeat:Connect(function()
if spin == true then
gradient.Rotation += 1
end
end)
end
spingradient()
The console output:
I’m not sure if this is caused from a new random studio update that I got today or what the cause is.
Yesterday the orbital camera worked as intended, but now for some reason setting the camera to orbital fires a ton of errors for no reason.
I have tested this in an empty template and it seems to still cause the error, I’m sure that I’m not the only one!
If anyone could review this for themselves and to find the solution, it would be grateful.
This is also my first post on the devforum,.