Hi, I am working on a game that requires the player to have their camera locked like shift lock but it doesn’t rotate etc. Yes, I tried asking AI but it was useless any ideas?
Scottifly
(Scottifly)
December 14, 2024, 8:36am
#2
Go to create.roblox.com . and choose the Learn > Overview tab.
Use the Search tool and use the term Camera.
There are a bunch of helpful links there.
I’m not good at finding stuff
I’ll have a look though
1 Like
please do research on devforum
LocalScript → StarterCharacterScripts
local Camera = workspace.CurrentCamera
-- what is the full z position
local CameraCFrame = CFrame.new(-1305.053, 4.835, 166) * CFrame.Angles(
math.rad(0.325),
math.rad(-38.022),
0
)
repeat
Camera.CameraType = Enum.CameraType.Scriptable
Camera.CFrame = CameraCFrame
task.wait(1)
until Camera.CameraType == Enum.CameraType.Scriptable
is this what you want?
The moving code works perfect, thanks.
wait(0.5)
game.Workspace.Camera.CameraType="Scriptable" game.Workspace.Camera.CFrame = CFrame.new(game.Workspace.lol.Position, game.Workspace.fouspart.Position)
i tried this in a local script in workspace. When I start the game, the camera doesn’t move and there are no errors. why is this happening? (ignore the names i was in a rush)
Although you marked a solution already, it is likely not your desired solution as the camera will be fixed around the center of the workspace.
Your original issue as described stems from the CurrentCamera properties being overridden by the built-in camera controller on startup. Adding a simple wait to the beginning of your code fixes the issue and gives the intended result.
repeat wait() until workspace.CurrentCamera
local camera = workspace.CurrentCamera
camera.CameraType = Enum.CameraType.…
None of those is what I want I want to force shift lock and No camera rotation