Here is what happens to my inventory UI when there is no delay to load:
And where it is delayed by 2 seconds to load:
Here is my load function:
function update(name)
local interactItemButton = inventoryGui:WaitForChild("InteractItemButton"):Clone()
local interactItemVFrame = inventoryGui:WaitForChild("InteractItemVFrame"):Clone()
interactItemButton.Parent = inventoryFrame
interactItemVFrame.Parent = interactItemButton
interactItemVFrame.BackgroundTransparency = 0
local worker = replicatedStorage:WaitForChild("Workers"):WaitForChild(name):Clone()
local camera = Instance.new("Camera", interactItemVFrame)
camera.CFrame = CFrame.new(worker.PrimaryPart.Position - Vector3.new(0, 0, -8))
interactItemVFrame.CurrentCamera = camera
worker.Parent = interactItemVFrame
table.insert(clickConnects, interactItemButton.MouseButton1Down:Connect(function()
updateSelected(name)
end))
end
Thank you for any help/suggestions!