Absolutely! I'll walk you through creating the UI in Roblox Studio step-by-step, then give you the complete script to copy and paste. Since you're good with models, this will be pretty similar - we're just building UI elements instead of 3D parts.
Part 1: Creating the UI Elements in Roblox Studio
Step 1: Create the ScreenGui Container
Open Roblox Studio and open your game
In the Explorer window (usually on the right), find StarterGui
Right-click on StarterGui → Insert Object → ScreenGui
Rename it to "LoadingScreenGui" (right-click the ScreenGui → Rename)
Step 2: Create the Black Screen
Right-click on LoadingScreenGui → Insert Object → Frame
Rename the Frame to "BlackFrame"
Select BlackFrame and look at the Properties window
Set these properties:
Size: {1, 0},{1, 0} (this makes it full screen)
Position: {0, 0},{-1, 0} (this starts it above the screen)
BackgroundColor3: Click the color box and make it pure black (R:0, G:0, B:0)
BorderSizePixel: 0
Step 3: Create the "Loading" Text
Right-click on BlackFrame → Insert Object → TextLabel
BackgroundTransparency: 1 (makes the background invisible)
Text: "Loading..."
TextColor3: Pure white (R:255, G:255, B:255)
TextScaled: Check this box ✓
Font: SourceSansBold (or any font you like)
Step 4: Create Your Button (if you haven't already)
In Workspace, create a part for your button (like a red brick)
Rename it to "TeleportButton"
Right-click on TeleportButton → Insert Object → Script
Rename the script to "ButtonScript"
Part 2: The Complete Script
Now copy and paste this script into your ButtonScript. This handles everything - the UI animation, teleportation, and cleanup:
lua
Part 3: Setting It Up
Step 1: Add the Script to Your Button
Select your button part in Workspace
Right-click → Insert Object → Script
Double-click the script to open it
Delete any existing code and paste the script above
Step 2: Customize the Teleport Location
In the script, find this line:
lua
local teleportPosition = Vector3.new(20, 5, 20)
Change the numbers (20, 5, 20) to where you want players to teleport:
First number: Left/Right position (X)
Second number: Up/Down position (Y)
Third number: Forward/Back position (Z)
To find coordinates easily:
Move your character to where you want players to teleport
In Studio, go to View → Output (opens the output window)
In the Command Bar at the bottom, type: print(game.Players.LocalPlayer.Character.HumanoidRootPart.Position)
Press Enter - it will show you the coordinates!
Step 3: Delete the UI from StarterGui
Since our script creates the UI automatically, you can delete the UI we made in StarterGui:
Go to StarterGui in Explorer
Right-click LoadingScreenGui → Delete
The script creates the UI fresh for each player when they click the button.
Part 4: Testing
Click the Play button in Studio (green triangle)
Walk up to your button and click it
You should see:
Black screen slides down from the top
"Loading." changes to "Loading.." then "Loading..." and repeats
After 2 seconds, you teleport
Black screen slides down and disappears
Troubleshooting
If the button doesn't work:
Make sure the script is inside the button part
Check the Output window for any red error messages
If you don't see the UI:
The script creates it automatically, so don't worry about the StarterGui version
If teleporting goes to the wrong place:
Update the teleportPosition numbers in the script
If you want to change the loading time:
In the script, find wait(2) and change the 2 to however many seconds you want
This should give you exactly what you described - a smooth black screen sliding in with bouncing dots! Once this works, you can copy this button setup to other rooms and just change the teleport coordinates. Let me know how it goes! 😊
-- Complete Button Script with Loading Animation
-- Paste this into the Script inside your button part
local button = script.Parent -- The button part
local clickDetector = Instance.new("ClickDetector")
clickDetector.Parent = button
-- Where to teleport (change these coordinates to your next room)
local teleportPosition = Vector3.new(20, 5, 20)
-- Services we need
local TweenService = game:GetService("TweenService")
local Players = game:GetService("Players")
-- Function to create and animate the loading screen
local function showLoadingScreen(player)
local playerGui = player:WaitForChild("PlayerGui")
-- Create the UI (we do this in script so each player gets their own)
local screenGui = Instance.new("ScreenGui")
screenGui.Name = "LoadingScreenGui"
screenGui.Parent = playerGui
-- Create black frame
local blackFrame = Instance.new("Frame")
blackFrame.Name = "BlackFrame"
blackFrame.Size = UDim2.new(1, 0, 1, 0) -- Full screen
blackFrame.Position = UDim2.new(0, 0, -1, 0) -- Start above screen
blackFrame.BackgroundColor3 = Color3.fromRGB(0, 0, 0) -- Black
blackFrame.BorderSizePixel = 0
blackFrame.Parent = screenGui
-- Create loading text
local loadingText = Instance.new("TextLabel")
loadingText.Name = "LoadingText"
loadingText.Size = UDim2.new(0, 200, 0, 50)
loadingText.Position = UDim2.new(0.5, -100, 0.5, -25) -- Centered
loadingText.BackgroundTransparency = 1 -- Invisible background
loadingText.Text = "Loading..."
loadingText.TextColor3 = Color3.fromRGB(255, 255, 255) -- White text
loadingText.TextScaled = true
loadingText.Font = Enum.Font.SourceSansBold
loadingText.Parent = blackFrame
-- Slide the black screen down from the top
local slideInTween = TweenService:Create(
blackFrame,
TweenInfo.new(0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.Out),
{Position = UDim2.new(0, 0, 0, 0)} -- Move to center of screen
)
slideInTween:Play()
-- Animate the bouncing dots
local dotCount = 0
local isAnimating = true
local function animateDots()
while isAnimating do
dotCount = dotCount + 1
if dotCount > 3 then dotCount = 1 end
if dotCount == 1 then
loadingText.Text = "Loading."
elseif dotCount == 2 then
loadingText.Text = "Loading.."
else
loadingText.Text = "Loading..."
end
wait(0.5) -- Wait half a second between dot changes
end
end
-- Start the dot animation in the background
spawn(animateDots)
-- Wait 2 seconds for "loading"
wait(2)
-- Stop the dot animation
isAnimating = false
-- Teleport the player
local character = player.Character
if character and character:FindFirstChild("HumanoidRootPart") then
character.HumanoidRootPart.CFrame = CFrame.new(teleportPosition)
end
-- Slide the screen away (downward)
local slideOutTween = TweenService:Create(
blackFrame,
TweenInfo.new(0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.In),
{Position = UDim2.new(0, 0, 1, 0)} -- Move below screen
)
slideOutTween:Play()
-- Clean up the UI when animation is done
slideOutTween.Completed:Connect(function()
screenGui:Destroy()
end)
end
-- When someone clicks the button, show the loading screen
clickDetector.MouseClick:Connect(function(player)
if player and player.Character then
showLoadingScreen(player)
print(player.Name .. " clicked the button!")
end
end)