ok but now the ui wont show up
- User
ok but now the ui wont show up
Assistant
Oops! I overcomplicated it and broke the UI. Let's go back to a simpler approach that actually works.
The issue is likely that I changed too many size properties at once. Let's use the original UI creation script but with one small tweak to make the size more consistent.
Replace your
LobbyGUIHandlerLocalScript with this simpler version:-- LobbyGUIHandler (LocalScript) - SIMPLE VERSION THAT WORKS local Players = game:GetService("Players") local ReplicatedStorage = game:GetService("ReplicatedStorage") local player = Players.LocalPlayer local playerGui = player:WaitForChild("PlayerGui") ------------------------------ -- Create the ScreenGui ------------------------------ local lobbyGui = Instance.new("ScreenGui") lobbyGui.Name = "LobbyGui" lobbyGui.ResetOnSpawn = false lobbyGui.Parent = playerGui ------------------------------ -- Create the BillboardGui ------------------------------ local teleportDisplay = Instance.new("BillboardGui") teleportDisplay.Name = "TeleportDisplay" teleportDisplay.Size = UDim2.new(0, 400, 0, 200) -- Back to pixel size (this works) teleportDisplay.AlwaysOnTop = true teleportDisplay.ExtentsOffset = Vector3.new(0, 3, 0) teleportDisplay.Parent = lobbyGui -- Wait for the GUIAnchor and attach to it local guiAnchor = workspace:WaitForChild("GUIAnchor") teleportDisplay.Adornee = guiAnchor ------------------------------ -- Create the Frame ------------------------------ local frame = Instance.new("Frame") frame.Parent = teleportDisplay frame.Size = UDim2.new(1, 0, 1, 0) frame.BackgroundColor3 = Color3.fromRGB(50, 50, 50) frame.BorderSizePixel = 2 frame.BorderColor3 = Color3.fromRGB(255, 255, 255) ------------------------------ -- Create the Title ------------------------------ local title = Instance.new("TextLabel") title.Name = "Title" title.Parent = frame title.Size = UDim2.new(1, 0, 0.3, 0) title.BackgroundTransparency = 1 title.Text = "🚚 DELIVERY MISSION" title.TextScaled = true title.Font = Enum.Font.GothamBold title.TextColor3 = Color3.new(1, 1, 1) ------------------------------ -- Create the Player Count ------------------------------ local playerCount = Instance.new("TextLabel") playerCount.Name = "PlayerCount" playerCount.Parent = frame playerCount.Size = UDim2.new(1, 0, 0.25, 0) playerCount.Position = UDim2.new(0, 0, 0.3, 0) playerCount.BackgroundTransparency = 1 playerCount.Text = "0/4 Players" playerCount.TextScaled = true playerCount.Font = Enum.Font.SourceSans playerCount.TextColor3 = Color3.fromRGB(200, 200, 200) ------------------------------ -- Create the Status ------------------------------ local status = Instance.new("TextLabel") status.Name = "Status" status.Parent = frame status.Size = UDim2.new(1, 0, 0.25, 0) status.Position = UDim2.new(0, 0, 0.55, 0) status.BackgroundTransparency = 1 status.Text = "Waiting for players..." status.TextScaled = true status.Font = Enum.Font.SourceSans status.TextColor3 = Color3.fromRGB(255, 255, 100) ------------------------------ -- Create the Leave Button ------------------------------ local leaveButton = Instance.new("TextButton") leaveButton.Name = "LeaveButton" leaveButton.Parent = frame leaveButton.Size = UDim2.new(0.8, 0, 0.2, 0) leaveButton.Position = UDim2.new(0.1, 0, 0.8, 0) leaveButton.BackgroundColor3 = Color3.fromRGB(200, 50, 50) leaveButton.Text = "LEAVE QUEUE" leaveButton.TextScaled = true leaveButton.Font = Enum.Font.SourceSansBold leaveButton.TextColor3 = Color3.new(1, 1, 1) leaveButton.Visible = false ------------------------------ -- Wait for RemoteEvents (they might not exist yet) ------------------------------ local updateGUI, leaveQueue -- Wait for the server to create the RemoteEvents spawn(function() updateGUI = ReplicatedStorage:WaitForChild("UpdateLobbyGUI") leaveQueue = ReplicatedStorage:WaitForChild("LeaveQueue") -- Now connect the events updateGUI.OnClientEvent:Connect(function(playerCountText, statusText, queuedPlayers) playerCount.Text = playerCountText status.Text = statusText local isInQueue = false for _, p in ipairs(queuedPlayers) do if p == player then isInQueue = true break end end leaveButton.Visible = isInQueue end) leaveButton.MouseButton1Click:Connect(function() leaveQueue:FireServer() end) end) print("LobbyGUI created successfully!") -- Debug messageQuick Debug Steps:
-
Test if the GUI appears: Run the game and check if you see the floating UI above the
GUIAnchorpart. If you don't see it at all, the problem is with the basic setup. -
Check the Output: Look at the Output window in Roblox Studio. You should see "LobbyGUI created successfully!" If you don't see this message, there's an error in the script.
-
Check your parts: Make sure you have a part named exactly
GUIAnchorin the Workspace.
If the UI still doesn't show up, try this emergency backup approach:
Create a simple test to see if any UI works at all:
-- EMERGENCY TEST UI (replace the whole script temporarily) local Players = game:GetService("Players") local player = Players.LocalPlayer local playerGui = player:WaitForChild("PlayerGui") -- Create a simple ScreenGui with a test label local testGui = Instance.new("ScreenGui") testGui.Parent = playerGui local testLabel = Instance.new("TextLabel") testLabel.Parent = testGui testLabel.Size = UDim2.new(0, 200, 0, 50) testLabel.Position = UDim2.new(0, 100, 0, 100) testLabel.Text = "TEST UI WORKS!" testLabel.BackgroundColor3 = Color3.new(1, 0, 0) print("Test UI created")If this test UI shows up, then the issue is with the BillboardGui or the GUIAnchor. If this test UI doesn't show up, there's a bigger problem with the script setup.
Let me know what happens with this simpler version!
-
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.