Is there a way to make the Intro code run when the user’s game has loaded? This code makes it so there’s a slight delay for the camera to apply and it starts before the game itself may have loaded. I’ve seen game.Loaded doesn’t quite work for that. The following local script is in StarterPlayerScripts.
local StarterGui = script.Parent.Parent:WaitForChild("PlayerGui")
local RunService = game:GetService("RunService")
local Players = game:GetService("Players")
local TweenService = game:GetService("TweenService")
local Camera = workspace.CurrentCamera
local MainUI = StarterGui:WaitForChild("MainUI")
local Black = MainUI:WaitForChild("Black")
local Computer = workspace:WaitForChild("Computer")
local CameraPart = workspace:WaitForChild("CameraPart")
local Player = Players.LocalPlayer
local Character = Player.Character or Player.CharacterAdded:Wait()
local function Intro()
Black.Visible = true
Camera.CameraSubject = CameraPart
Camera.CameraType = Enum.CameraType.Scriptable
Camera.CFrame = CameraPart.CFrame
TweenService:Create(Camera,TweenInfo.new(3,Enum.EasingStyle.Quad,Enum.EasingDirection.Out,0,false),{CFrame = Camera.CFrame * CFrame.new(Vector3.new(0,0,-7))}):Play()
TweenService:Create(Black,TweenInfo.new(5,Enum.EasingStyle.Linear,Enum.EasingDirection.Out,0,false),{BackgroundTransparency = 1}):Play()
end
RunService.Heartbeat:Wait()
Intro()