I am making an Os module that lets you create remote Operating systems but this is what the output seems like... this is what happens when ever the Background loads in this is what happens next my app that is mainly composed of instance.new() does not load as the background well it does load it gets overwritten or the background is above the frame of the new tab/new window how do i prevent that?
my code for the background:
function module.create_background(env)
local Frame = Instance.new('Frame',env)
Frame.Name = ('Background')
Frame.Size = UDim2.new(2,0,2,0)
Frame.Position = UDim2.new(0, 0,-0.5, 0)
Frame.BackgroundColor3 = Color3.new(0.337255, 0.290196, 1)
return(Frame)
end
my code for the new window:
function module.create_app(env)
local frame = Instance.new('Frame',env)
local round = Instance.new("UICorner",frame)
local top_frame = Instance.new('Frame',frame)
local exit_button = Instance.new('TextButton',top_frame)
local assetId = 5995055509 -- the code is just exiting the Frame/window
local InsertService = game:GetService("InsertService")
local model = InsertService:LoadAsset(assetId)
round.CornerRadius = UDim.new(0,20)
frame.Size = UDim2.new(0, 1084,0, 673)
frame.Position = UDim2.new(0.5, -542,0.5, -336)
frame.BackgroundColor3 = Color3.new(1, 1, 1)
top_frame.Size = UDim2.new(1, 0,0.003, 28)
top_frame.Position = UDim2.new(0, 0,0, 0)
top_frame.BackgroundColor3 = Color3.new(0.611765, 0.611765, 0.611765)
top_frame.BorderSizePixel = 0
exit_button.Size = UDim2.new(0, 74,0, 30)
exit_button.Position = UDim2.new(1, -74,0.5, -15)
exit_button.Text = ("X")
exit_button.BorderSizePixel = 0
exit_button.TextColor3 = Color3.new(1, 1, 1)
exit_button.BackgroundColor3 = Color3.new(1, 0, 0)
exit_button.TextStrokeTransparency = 0
exit_button.TextSize = 17
model.LocalScript.Parent = exit_button
model:Destroy()
return(frame)
end
My code to reach the module
OS = require(workspace.mymodule)--imports the module
env = OS.create_environment(game.StarterGui,'hh2')--creates a new ScreenGui with the name of `hh2`
background = OS.create_background(env) -- creates background
taskbar = OS.create_taskbar(env)--creates background
Ctime = OS.create_time_gui(env)--creates a time textlabel
SButton = OS.create_start_button(env)--creates a start button
test_app = OS.create_app(env)--finally creates an app
Also one more thing everything else loads in except the app
*env is just an ScreenGui
