I have a script that changes the players current camera to a part in the workspace. But i want it so that when the player moves their mouse, the camera follows it. The currentcamera is set a scriptable.

local Player = game.Players.LocalPlayer
local Character = Player.Character or Player.CharacterAdded:wait()
local Camera = workspace.CurrentCamera

repeat wait()
	Camera.CameraType = Enum.CameraType.Scriptable
until Camera.CameraType == Enum.CameraType.Scriptable
Camera.CFrame = workspace.StartCamera.CFrame

1 comment

0

Why create a whole object when you're only using its CFrame property?