#First click doesn't work

1 messages · Page 1 of 1 (latest)

static galleon
#

First click doesn't work, but other did

#

here's the script

#

idk why

#

did anyone have same problem

iron creek
#

hello

#

i recommend you separate the functionality from your display

#

you shouldn't rely on visual elements to make determinations like you are

static galleon
iron creek
#
if script.Parent.Text == "View: All" then
        script.Parent.Text = "View: Easy"
        remove()
        diff("Easy")
    elseif script.Parent.Text == "View: Easy" then
        script.Parent.Text = "View: Normal"
        remove()
        diff("Normal")
    elseif script.Parent.Text == "View: Normal" then
        script.Parent.Text = "View: Hard"
        remove()
        diff("Hard")
    elseif script.Parent.Text == "View: Hard" then
        script.Parent.Text = "View: Epic"
        remove()
        diff("Epic")
    elseif script.Parent.Text == "View: Epic" then
        script.Parent.Text = "View: Legendary"
        remove()
        diff("Legendary")
    elseif script.Parent.Text == "View: Legendary" then
        script.Parent.Text = "View: All"
        remove()
        bringback()
    end
#

lookie here

static galleon
#

alr

iron creek
#

you're comparing the text of a label to determine what the next text should be

#

that's using the displayed information to determine the function

static galleon
#

oh

static galleon
iron creek