So I am working with viewport frames and I . noticed that I don't need to parent the Camera to anywhere and still set the CurrentCamera of the ViewportFrame using the variable
But I was wondering if this is safe
I want to do this to make it non complicated if you know what I mean
Basically this
local Camera = Instance.new('Camera')
local Viewport= Instance.new('ViewportFrame')
Viewport.Parent = script.Parent -- Frame
Viewport.CurrentCamera = Camera -- Using the variable
But does this all stack up

1 comment
Roblox won't suddenly destroy the instance if its parented to nil. Otherwise, any code using Instance.new would break because the object is parented to nil.