Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How do I make a camera lock somewhere on joined?

When someone joins the game, I want their camera to lock onto an object (can not move it) so I can create a menu there. Like it will lock onto looking somewhere and they can select start game and stuff.

Example: On an adventure game it shows an overview of the map

2 comments

0

Easy fix: make a gui with a textbutton covering whole screen with .99 transparency... Then make sure they cannot zoom in.

0

well then they cant do anything lol

1 answer

✓ Accepted answer

you can use the CurrentCameras CFrame of workspace by changing the CameraType to Scriptable like this:

local camera = workspace.CurrentCamera
local player = game.Players.LocalPlayer
local char = player.Character

wait(0.1)
camera.CameraType = Enum.CameraType.Scriptable -- changes so we can script it
camera.CFrame = workspace.Block.CFrame -- define what Part you want to lock the camera on

also make sure its a local script and your Part is facing your target or whatever. if you want to make the camera go to normal you can just set the CameraType to Custom, such as this:

local camera = workspace.CurrentCamera
local player = game.Players.LocalPlayer
local char = player.Character

camera.CameraType = 'Custom' -- changes it to the default camera

This discussion is preserved as it was. New answers, comments, and votes are closed.