How to make it so ui doesn't disappear in freecam?

I want it so players can have a UI button to turn on free cam while keeping all the UI because the default roblox freecam scripts removes all ui.

Your best bet is making your own freecam. This is just a guess, but I’m pretty sure you cannot edit Roblox freecam unless you make your own.

So yesterday I made a module about rotating User Interface, it actually uses Parts so you could make a part and make it fit to the screen make it transparent.

Here’s some of the code “Don’t try it because it won’t work”

local viewportSize = camera.ViewportSize
local basePart = Instance.new("Part")
basePart.Size = Vector3.new(20, 7, 0)
basePart.CanCollide = false
basePart.Transparency = 1
basePart.Anchored = true
basePart.Parent = workspace

gui.BasePart = basePart

self.offset = Vector3.new(0, 0, 0)
self.size = Vector3.new(20, 7, 0)
self.cframe = CFrame.new(0, 0, 0)
self.position = Vector3.zero
self.orientation = Vector3.new(0,0,0)

local surfaceGui = Instance.new("SurfaceGui")
surfaceGui.Parent = basePart
surfaceGui.Face = Enum.NormalId.Front
surfaceGui.Adornee = basePart
surfaceGui.CanvasSize = Vector2.new(viewportSize.X, viewportSize.Y)

for _, v in pairs(self.Assets) do
	if v:IsA("LocalScript") or v:IsA("Script") then
		v.Parent = self.ScreenGui.Parent
	else
		v.Parent = surfaceGui
	end
end

Set the screenGUI insets higher than that from the freecam Gui you can find when playing

what does that mean?

aaaaaaaaaaaaaaaaaa