I am trying to make a first person game, and in the menu I would like the player to be standing right at the start, so when they press play it puts them in exactly where the menu took place. I don’t want the player’s camera to be able to move while they are in the menu, and in order to do this I am setting the camera type to scriptable when they join. It is not working though, here is the code:
local camera = workspace.CurrentCamera
camera.CameraType = Enum.CameraType.Scriptable
camera:GetPropertyChangedSignal("CameraType"):Wait() --This part waits for the player to be fully loaded if they aren't already
camera.CameraType = Enum.CameraType.Scriptable
How can I make this work?
(It is a LocalScript in Workspace)
This works for changing the camera type, but while waiting to change it, the player can move the camera. I tried bringing the ‘wait()’ down, but then it stopped working
local Player = game:GetService("Players").LocalPlayer
local camera = workspace.CurrentCamera
repeat wait()
camera.CameraType = Enum.CameraType.Scriptable
until camera.CameraType == Enum.CameraType.Scriptable
just set the camera to FIXED. When you set it to scriptable, you need to set it to a CFRAME for it to have that effect. however, if you just make it fixed, it will stop the player from moving the camera