Use currentCamera for ViewPortFrame

Hello!
I try to make a system where the normal camera ( the normal one, the camera we use normally when we play roblox ) but i want that this camera is render inside the viewportframe. There is some solutions ?

I try this, but obviously, it doesnt work :

local viewport = script.Parent.ViewportFrame

local currentCamera = workspace.CurrentCamera

viewport.CurrentCamera = currentCamera

I am not sure about this, but I think that this will only work on the client, since workspace.CurrentCamera only belongs to the client.

1 Like

Humm okay… i already script in the local script. what do you advise me ?

Test it as a player and not as the server, cause the server does not have workspace.CurrentCamera (actually it might, but I do not know for sure).

1 Like

how ? xDD i dont know how play it as a player

afbeelding

Select ‘Play Here’ or ‘Play’

1 Like

doesnt work :confused: thanks anyway
do you have another idea ?

Place the LocalScript inside PlayerScripts.

nope :confused: i think the script is the problem

-- You need to update the viewport variable
local viewport = workspace.Part.ViewportFrame
local currentCamera = workspace.CurrentCamera
viewport.CurrentCamera = currentCamera

how did i put viewportframe into part ??

did another person have a solution ? xd