I want a script to lock the players view to a camera inside of a part that is aimed towards a soccer field I made as a part of my GUI menu.
Cam = workspace.CurrentCamera Cam.CameraType = Enum.CameraType.Scriptable Target = workspace.CameraPart Position = Target.Position Cam.CameraSubject = Target Angle = 0 Cam.CoordinateFrame = Target.CFrame
CameraPart is the part I want the camera to look from. CameraMenu is the localscript.
I recently remembered how to use Camera Manipulation, so I think I can help you out. So, I believe this is how your script should go. (Don't forget, put this in a LocalScript in your StarterGui for the base of what I'm telling you.)
Target = game.Workspace.CameraPart *(Do not do "workspace", use "game.Workspace")* local cam = game.Workspace.CurrentCamera cam.CameraType = Enum.CameraType.Scriptable cam.CameraSubject = Target angle = 0 while wait() do cam.CoordinateFrame = CFrame.new(Target.Position) end