Hi there! So, I'm currently developing a horror game and I'm trying to make a cool menu loading screen. My plan is to have the "Play" button and have a spooky scene in the background. I've built my scenery and placed in my play button but I can't seem to lock the camera right. I want to lock player's camera in a certain place as soon as they joined.
Below is my script.
repeat wait() until workspace.CurrentCamera
local camera = workspace.CurrentCamera
camera.CameraType = Enum.CameraType.Scriptable camera.CFrame = (workspace.cameraLookAt.CFrame + Vector3.new(0, 0, 10))
If I've done anything wrong please correct me in the replies. Thank You!
So you want it to look at a certain part? If so... Here is your fixed script.
local player = game.Players.LocalPlayer local cam = workspace.CurrentCamera local focuspart = game.Workspace.FocusPart --- part you want the camera to focus on repeat wait() local character = player.Character or player.CharacterAdded:Wait(1) until character cam.CameraType = Enum.CameraType.Fixed cam.Focus = focuspart.CFrame