Is it safe not parenting the camera anywhere?
Asked by
5 years ago Edited 5 years ago
I was wondering when I did Instance.new and not parenting them
where do they go
I was wondering if this would put stress on the server and lag it
the main problem i had was
01 | local function GenerateViewport(Table) |
02 | local Camera = Instance.new( 'Camera' ) |
04 | for i,v in pairs (Table) do |
05 | local ViewportFrame = Instance.new( "ViewportFrame" ) |
06 | ViewportFrame.Parent = script.Parent.Frame |
07 | ViewportFrame.CurrentCamera = Camera |
08 | ViewportFrame.BackgroundTransparency = 1 |
09 | ViewportFrame.BorderSizePixel = 0 |
11 | v.Parent = ViewportFrame |
12 | v.CFrame = Camera.CFrame * CFrame.new( 0 , 0 ,- 5 ) |
This would still work even when the camera wasn't parented to anything
But is this recommended?
I was wondering if the camera is automatically destroyed or it dosen't exist at all therefore preventing client lag
Does this all stack up and cause problems later on?
Do I still need to destroy the camera?