Camera script not working

so i have this script

workspace.Camera.CameraType = Enum.CameraType.Scriptable
workspace.Camera.CFrame = workspace.Menu.MenuCamera.CFrame

which is supposed to set the players camera once he joins but it just wont work for some reason. ive tried using CharacterAppearanceLoaded and it still didnt work

1 Like

The 2nd line will only set the camera once. You need the camera to be repeatedly set:

workspace.Camera.CameraType = Enum.CameraType.Scriptable

game:GetService("RunService").RenderStepped:Connect(function()
     workspace.Camera.CFrame = workspace.Menu.MenuCamera.CFrame
end)

If MenuCamera is also a camera, you can just set workspace.CurrentCamera to it in order to swap cameras. Now, for waiting for the CurrentCamera to exist in the first place you can do…

-- Yields until the camera exists.
game.ContentProvider:PreloadAsync({workspace.Camera})

nope it still doesnt work, also menucamera is a part

Wassup, I think what you’re trying is this

repeat wait()
	Camera.CameraType = Enum.CameraType.Scriptable
until Camera.CameraType == Enum.CameraType.Scriptable
Camera.CFrame = workspace.Menu.MenuCamera.CFrame
1 Like

had to change it up a little, but yeah it works, thanks!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.