Is it possible to make the player change viewpoints in game?

I’m trying to make a game that is inspired by the Mario games, and I’m trying to figure ways I can do the level selection. One idea is how the selection is in Mario Brothers 2, where there’s a top down view and the player can walk along a path of levels and press a button to play the chosen level that is played from a side view.

The only problem is I don’t know if I could and how I can make the players viewpoint be changed from top down so side view. I already have a script for the side view, so would I just need to have it changed so that when the player enters the level select the view changes? If so how would I do that?

local player = game.Players.LocalPlayer
local camera = workspace.CurrentCamera

player.CharacterAdded:Wait()
player.Character:WaitForChild("HumanoidRootPart")

camera.CameraSubject = player.Character.HumanoidRootPart
camera.CameraType = Enum.CameraType.Attach
camera.FieldOfView = 40

local RunService = game:GetService("RunService")

local function onUpdate()
	if player.Character and player.Character:FindFirstChild("HumanoidRootPart") then
		camera.CFrame = CFrame.new(player.Character.HumanoidRootPart.Position) * CFrame.new(0,0,30)
	end
end

RunService:BindToRenderStep("Camera", Enum.RenderPriority.Camera.Value, onUpdate)

I cant axes my computer til tomarow to test smh but ima go do some reserch and brainstorm

2 Likes

Try rotating the camera while you wait

1 Like

Look through there and modify that

1 Like

Changing field of view is different than changing camera cframe. What I would do is have a remote event that fires to the player whenever they go into the level. Then on the client whenever the player gets that event, it will know to swap. I can’t write code rn because I’m on my phone but I’ll right some for you when I get back on my laptop.

1 Like

So you want to make it 2d? (Charactor limmit)

1 Like

Btw when i say (charractor Limmit) thats for the min

He just wants to change the perspective

1 Like

The game is already 2d, just wanna change the view from being at the side to being at the top

1 Like

Ooh im sorry im going to have stop with this 1 and go help someone else this is beyond my 9 42 brain

1 Like

Do you mean camera offset ?

game:GetService('Players').LocalPlayer.Character:FindFirstChild('Humanoid').CameraOffset = Vector3.new(0, 15, 0)

Not completely sure what you mean by ‘viewpoint’

That’s pretty much it. By viewpoint I meant where the camera is

1 Like