Roblox Studio testing mode stuck at skybox

I am trying to test my game in Studio, but its loading is stuck to viewing the skybox. I have tried deleting everything in the game to check if models/meshes were causing the problem, but still it remained at the skybox screen. The most recent script I added after the last time I was able to test play is just another candle script which already appears many times in the game. The picture below shows the only objects I added after the last working test play.

There are a few things to check, but you may have tried already:

  • Is it actually stuck at the skybox, or is the Explorer window open and useable but there’s nothing in the Workspace? You may have deleted everything accidentally, or a script may be deleting everything in your place. If you’ve installed any items from the toolbox recently or installed any new plugins they may have injected a script into some other spot or service in your Explorer window.
  • Close out of studio and rejoin. It may be a glitch in your session.
  • If that doesn’t work then uninstall (don’t just delete it) and reinstall Studio to check to see if your Studio has a glitch.

I tried the first option, and I found that this camera script I made stopped the game from loading if I put it in StarterPlayerScripts, but works perfectly in StarterCharacterScripts. Any idea why this is? I am a beginner at scripting but I don’t think this has any loops.

local replicated = game:GetService("ReplicatedStorage")
local tweenservice = game:GetService("TweenService")

local tweeninfo = TweenInfo.new(
	1,
	Enum.EasingStyle.Sine,
	Enum.EasingDirection.InOut,
	0,
	false,
	0
)

local localcamera = game.Workspace.CurrentCamera
local camfolder = game.Workspace:WaitForChild("Cameras") --workspace folder where camera parts are placed

local cameraTargets = {
	Bone = camfolder:WaitForChild("CamBone"),
	Wone = camfolder:WaitForChild("CamWone"),
	None = camfolder:WaitForChild("CamNone")
	--a list of camera parts in the workspace corresponding to a remote event's name
}

local function targetinitiate(cameraPart)
	local targetCF = cameraPart.CFrame
	local camtween = tweenservice:Create(localcamera, tweeninfo, {CFrame = targetCF})
	localcamera.CameraType = Enum.CameraType.Scriptable
	camtween:Play()
	--function to tween the camera to the target part
end

local function targetend()
	localcamera.CameraType = Enum.CameraType.Custom
end

replicated.ChildAdded:Connect(function(v)
	if v:IsA("RemoteEvent") then
		targetinitiate(cameraTargets[v.Name]) --matches the name of the remote event to the camera part
	else return end
end)

replicated.ChildRemoved:Connect(function(v)
	if v:IsA("RemoteEvent") then
		targetend() --when the event finishes the remote event will delete, returning the camera to the player
	else return end
end)