mvagicaI
(mvagicaI)
May 2, 2021, 6:39pm
#1
I have a GUI Button (imagebutton) that is a back button. Basically when pressed, it goes back to the home screen. If I go back to that same page the back button is located, and press it again after pressing it another time before , it does not work.
script.Parent.MouseButton1Click:Connect(function(plrd)
script.Parent.Parent.Visible = false
script.Parent.Parent.Parent.Buttons.Visible = true
end)
Is that code snippet the one that controls the back button?
Are you getting any errors on your Output tab at all? (Head to Studio > Find the View Category > Output Tab)
mvagicaI
(mvagicaI)
May 2, 2021, 6:49pm
#4
No errors or any output at all
Try this:
print("This is running")
script.Parent.MouseButton1Click:Connect(function()
print("Fired")
script.Parent.Parent.Visible = false
script.Parent.Parent.Parent.Buttons.Visible = true
end)
mvagicaI
(mvagicaI)
May 2, 2021, 6:58pm
#6
It’s outputting the fired but it’s not actually doing anything
Try changing it to a LocalScript
if you haven’t done so already?
1 Like
mvagicaI
(mvagicaI)
May 2, 2021, 7:01pm
#8
Can’t believe I actually forgot that, that would be the fix, thanks!
1 Like
I didn’t see that cause I didn’t get the notification in time thanks forum
Old Message
Also do make sure to mark the post as a solution that helped you the most! This is to ensure that members of the Forum are aware about it being solved
mvagicaI
(mvagicaI)
May 2, 2021, 7:04pm
#10
Already did right after I sent my reply