I'm making a ROBLOX game, and I've got a GUI issue:
- I've got a "Start Game" button, but I have it in an elif statement to where it just toggles from "Start Game" to "Game Loading..." back and forth when you click it. How can I change it so instead of saying "Game Loading...", when you click it, it transitions into the actual game (my workspace)?
I don't even want "Game Loading..." to show up, I only put it there when I was learning the ins and outs of buttons.
My GUI is just the start menu, so when you click Start Game, the GUI should go away and you'd be loaded into the actual game.
Here's what I've got for the script for the button:
local button = script.Parent
local toggled = false
local function onButtonActivated()
if toggled == false then
button.Text = "Game Loading..."
toggled = true
else
button.Text = "Start Game"
toggled = false
end
end
button.Activated:Connect(onButtonActivated)
Note: I'm using Lua (ROBLOX's default language) via IntelliJ and just copy-pasting my finished code into the scripts, since IntelliJ has a much better text editor than ROBLOX's default one.