Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Is it safe not parenting the camera anywhere?

for i = 1,66666 do
	Instance.new('Part')

end

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

local function GenerateViewport(Table)
	local Camera = Instance.new('Camera') -- Camera I dont want to parent it because it would be confusing
	
	for i,v in pairs(Table) do
		local ViewportFrame = Instance.new("ViewportFrame")
		ViewportFrame.Parent = script.Parent.Frame
		ViewportFrame.CurrentCamera = Camera
		ViewportFrame.BackgroundTransparency = 1
		ViewportFrame.BorderSizePixel = 0
		
		v.Parent = ViewportFrame
		v.CFrame = Camera.CFrame * CFrame.new(0,0,-5)
		v.Anchored = true
	end

	
end

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?

1 answer

This won't affect it if you parent it back to where it should be.

This discussion is preserved as it was. New answers, comments, and votes are closed.