Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

Another else problem. Mind if someone pastes in the correct script to make it work?

Asked by
raid6n 2196 Moderation Voter Community Moderator
4 years ago

LOGIC: if order1 is not visible, then it will be visible. if it is then order2 will be visible and so on.

Here's the script

-- Variables --
local Page1 = game.StarterGui["Waiter/Waitress Board"].TextButton.Page1
local Order1 = Page1.Order1
local Order2 = Page1.Order2
local Order3 = Page1.Order3


-- Scripting --

    script.Parent.Background3.Submit.MouseButton1Click:Connect(function()
        Order1.Visible = true
else
    Order2.Visible = true
else
    Order3.Visible = true
    end)

Help?

1 answer

Log in to vote
1
Answered by 4 years ago
Edited 4 years ago

Try this out

if not Order1.Visible then--if order 1 is not visible, make it visible and move on
    Order1.Visible = true
elseif not Order2.Visible then--if order 1 is already visible then, if order 2 is not visible make it visible and move on
    Order2.Visible = true
elseif not Order3.Visible then
    Order3.Visible = true
end

"if not" is the same as saying...

if Order1.Visible == false then
Ad

Answer this question