✓ Accepted answer
http://wiki.roblox.com/index.php?title=Camera_manipulation
local cam = workspace.CurrentCamera
cam.CameraType = "Scriptable"
Pos = Map.PrimaryPart.CFrame
High =
cam.CoordinateFrame=CFrame.new(Pos.X, (Pos.Y +High),Pos.Z)
cam.Focus=CFrame.new(cam.CFrame.X,(Cam.CFrame.Y - 1),cam.CFrame.Z)
So, normally, no one will write code for you, but this is an exception because I took most of this code straight out of the Wiki and tweaked it for you with comments and the variables.
If you dont understand what i am about to say , go to the link for more info and examples
so, since this is a local script, we can take the players current camera via workspace.CurrentCamera and turn it into a variable (cam)
Changing the cam's CameraType to scriptable takes all control away from the user.
What i personally added is, the pos variable. This gets the primary part of the map (which you should make the center of the map) and takes it's position. I also added High, how high above the map you want the camera to be.
I then make the cam's postion the map's X and Z, then I add the height to the Y axis. I then make the camera look down by making the camera focus one stud below it.
You can do some awesome stuff with scriptable cameras! You can even make it cooler using trignometry to make the camera zoom in and out when players move closer and farther from each other!
1 comment
Oh, so sorry for not responding. This should be placed in starter player scripts