Anybody know why this viewport doesnt work?

I have 0 idea why this doesnt work but the viewport just has nothing to show up and does nothing

heres the code

local vp = script.Parent
local mapfolder = workspace.Map

local function clonemap()
local clonedfolder = mapfolder:Clone()
clonedfolder.Parent = vp
end

local function setupcamera()
local vpcam = Instance.new(“Camera”)

vpcam.Parent = vp
vp.CurrentCamera = vpcam
vpcam.CFrame = Vector3.new(0,20,20)

end

local function startVP()
setupcamera()

clonemap()

end

startVP()

I tested your code, and got this error:

“Unable to assign property CFrame. CoordinateFrame expected, got Vector3”

Change Vector3 to CFrame and you should be good.

1 Like

oh alright thanks ill try it in a few minutes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.