Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Make a camera that sets only when a player joins?

Asked by 2 years ago

I want to make a special camera that sets only when a player joins, currently the camera works but when they click the play button (they spawn in as the character they just customized, the camera doesn't switch to custom, it reruns.

Current code

local Player = game.Players.LocalPlayer
local Character = Player.Character or Player.CharacterAdded:Wait()
local Camera = workspace.CurrentCamera

repeat wait()
    Camera.CameraType = Enum.CameraType.Scriptable
until Camera.CameraType == Enum.CameraType.Scriptable
Camera.CFrame = workspace.Intro.IntroCam.CFrame

Answer this question