#Buttons Not Working Properly

1 messages · Page 1 of 1 (latest)

crude grail
#

For some reason when I select Large Aircraft then a brand then a model the buttons stop working as expected (This doesn't happen for the other aircraft sizes.
Here's my script (Sorry its long af)

#

There is a video showing the issue

copper coyote
#

So you do have the Large Aircraft manually called here:

SelectedLarge = true
SelectedAirbus = true

(and the same for Boing)

But... when you call aircraftButtonClicked(), your Boing Medium is checked twice (SelectedBoeing == true and SelectedMedium == true) but unless I'm blind I don't see anything for Boing + Large inside of aircraftButtonClicked()?

Soo, you might need to add the following to your buttonclicked function

if SelectedBoeing == true and SelectedLarge == true then
    -- whatever you want it to do?
end
crude grail
#

Sorry but the same issue is still occurring. I've double checked that the buttons for BoeingButton2 and AirbusButton2 are set Active = false. But im not sure why i Can still click it

copper coyote
#

You're saying that it's working correctly for Small and Medium selections though?

crude grail
copper coyote
#

I think maybe because you're setting their visibility explicitly

Button.Visible = false

But when you're doing it for Large Aircraft you're nnot setting them to invisible after you tween? So after calling for your HideButton2:Play() you need to wait for the tweening to finish before setting them not visible explicitly?

crude grail
#

Sorry same issue, btw Thank you for helping me out with this i appreciate it.

copper coyote
#

What does your AirbusButton2 handler look like rn?

crude grail
copper coyote
#

I was thinking something more like

AirbusButton2.MouseEnter:Connect(function()
    AirbusButton2.BackgroundTransparency = 0.5
end)

AirbusButton2.MouseLeave:Connect(function()
    AirbusButton2.BackgroundTransparency = 0.7
end)

AirbusButton2.MouseButton1Click:Connect(function()
    SelectBrand = true
    SelectedLarge = true
    SelectedAirbus = true
    AirbusButton2.Active = false
    BoeingButton2.Active = false
    HideSelectionTitle:Play()
    HideAirbusButton2:Play()
    HideBoeingButton2:Play()
    HideBoeingButton2.Completed:Wait()

--this is where I made changes
    AirbusButton2.Visible = false
    BoeingButton2.Visible = false

    SelectionTitle.Text = "Select Aircraft Model"
    Aircraft1Button.Text = "Airbus A380"
    Aircraft2Button.Text = "Airbus A340"
    Aircraft1Button.Visible = true
    Aircraft2Button.Visible = true
    ShowSelectionTitle:Play()
    ShowAircraft1Button:Play()
    ShowAircraft2Button:Play()
    Aircraft1Button.Active = true
    Aircraft2Button.Active = true
end)
crude grail
#

IT WORKS NOW TYSM!!!!! 🥳