Hello there!
I am currently developing GUI at Roblox Studio and prepared everything in regard to the frames. Now, to make the frames appear and disappear once clicking a button, I created a script underneath an ImageButton
and begin to structure it simply:
local BadgeFrame = game.Players.LocalPlayer.PlayerGui.BadgeGui.BadgeFrame.PageFrame
script.Parent.MouseButton1Click:Connect(function()
BadgeFrame.Visible = true
end)
Testing the experience and the button at Roblox Studio, in the Output, it turns out that MouseButton1Click
is not a valid member for the ImageButton
, leading to making an error. Oddly, I decided to take a look into other options for Mouse, and those that are “close” were MouseEnter
and MouseLeave
, but sincerely they appear to not help and make sure to have the visibility all in all until another event is fired separately… I tried checking out other experiences of mine and analyzed that MouseButton1Click
appears to only work for TextButton
.
Therefore, I would like to know if there is any alternative that can solve my little issue. If anyone can help me with this, I would really appreciate it!
Thank you!