Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How to make an orbiting camera around the map?

So I have a main menu gui with a play button, tutorial, etc. and I want the camera to orbit the map in the background so you get a 360 view. I've seen this in a lot of games so I know its completely doable. However, I can't find any tutorials about it. Can someone point me to a tutorial or explain how I would create that orbiting/circling camera movement?

Thanks

1 answer

Scripting helpers is NOT a request site, please provide a script next time!

I will only provide the camera changing script since you never provided a script originally. The camera can be manipulated through the CurrentCamera which is in the workspace. You may learn more about Camera Manipulation here: https://developer.roblox.com/articles/Camera-manipulation

Manipulation of the camera via a script must always set the CameraType to scriptable or else it will not change. To make the camera change to the wanted part, you set the Camera's CFrame to that part.

local Player = game.Players.LocalPlayer
local Char = Player.Character
local Cam = workspace.CurrentCamera

repeat wait()
until Char --Wait until the character has loaded
repeat wait()
until Cam --Wait for the camera
Cam.CameraType = Enum.CameraType.Scriptable --Make it so we 	are able to change the camera location

while wait() do --Create a loop so whenever the camera moves, it updates
	Cam.CFrame = workspace.CamPart.CFrame --Change th camera
end

For the orbiting of the part, this can be done using CFrame Angles. To get more information about this, check out this link: https://developer.roblox.com/articles/Euler-Angles

If this has helped please accept the answer, have a nice day! :)

This discussion is preserved as it was. New answers, comments, and votes are closed.