-
What do you want to achieve?
I want to make it click so it goes back to the main UI
-
What is the issue? Include screenshots / videos if possible!
The back button doesnt work on the script but it does with other scripts. -
What solutions have you tried so far?
I added a wait function after the transition and it all works perfectly but i want it to transition with the button click,
I have tried made it only to print when clicked but it doesnt work.
textbo.MouseButton1Click:Connect(function()
--credit button
if db then
print("clicked")
db = false
print("db false")
game.ReplicatedStorage.click:Play()
credFrame.Visible = true
credFrame.Transparency = 1
credUIelements(1, true)
-- Going black screen and fading the buttons
local blackscreenon = tweenService:Create(credFrame, tweenInfo, tweenProp)
local blackminorfade = tweenService:Create(credFrame, tweenInfo, tweenPropMinorFade)
local fadebuttons = tweenService:Create(textbo, tweenInfo, tweenProp2)
blackscreenon:Play()
fadebuttons:Play()
wait(1)
buttonVisible1(1, false)
blackminorfade:Play()
mainframe.Transparency = 1
wait(1)
-- Fade out the frame, text boxes, and text button
local lineframef = tweenService:Create(frameline, tweenInfo, tweenProp)
local titlefade = tweenService:Create(titlebox, tweenInfo, tweenProp3)
local bodyfade = tweenService:Create(bodybox, tweenInfo, tweenProp3)
local backbofade = tweenService:Create(backbo, tweenInfo, tweenProp3)
lineframef:Play()
titlefade:Play()
bodyfade:Play()
wait(1.05)
backbo.Visible = true
backbofade:Play()
wait(1)
print("click now")
-- THE MAIN ISSUE
-- THE MAIN ISSUE
-- THE MAIN ISSUE
backbo.MouseButton1Click:Connect(function()
print("clicked")
--it doesnt print
db = true
print("goingback")
game.ReplicatedStorage.click:Play()
tweenService:Create(backbo, tweenInfo, tweenProp2):Play()
wait(1)
backbo.Visible = false
blackscreenon:Play()
tweenService:Create(frameline, tweenInfo, tweenProp1):Play()
tweenService:Create(titlebox, tweenInfo, tweenProp2):Play()
tweenService:Create(bodybox, tweenInfo, tweenProp2):Play()
wait(1)
credFrame.Visible = false
buttonVisible1(1, true)
mainframe.Transparency = 0
tweenService:Create(mainframe, tweenInfo, tweenPropMinorFade):Play()
tweenService:Create(mainframe.CDonate, tweenInfo, tweenProp3):Play()
tweenService:Create(mainframe.Pla, tweenInfo, tweenProp3):Play()
tweenService:Create(textbo, tweenInfo, tweenProp3):Play()
wait(1)
end)
end
end)