Hello! I’m trying to work on this SurfaceUI, and it was working completely fine until this issue randomly appeared.
I have a frame of ImageButtons which are not working. When you click them, nothing occurs, however the script recognizes them. It also recognizes all of the other buttons, they all work.
for _,Star in pairs(App.Stars:GetChildren()) do
if(Star:IsA("ImageButton")) then
print("StarExists") -- Works!
Star.MouseButton1Click:Connect(function()
print("GotClick!") -- Doesn't work!
end)
end
end
did you did the star code in a Function or just outside like
function yourFunction()
-- the code
end
-- OR
for _,Star....
nevermind thats a dumb question i tought it was maybe a probleme in the function but u actually receive the print saying that the button exist… thats weird
If i remember correctly, SurfaceUI and BillboardGUIs when having a Button, the Button will only work when the SurfaceUI/BillboardGUI is placed under StarterGui… and Under a ScreenGui
i placed a textbutton with a size of x = 1 y = 1 (scale) inside the imagebutton and that worked
make sure textbutton is visible but 0 background transparency