Upon joining the game, a script waits for the player's Character to load and then adorns a SurfaceGui that is placed into his or her StarterGui beforehand to a part in the Workspace.
The script inside of the SurfaceGui which is in the Player's StarterGui:
repeat wait() until script.Parent.Parent.Parent.Character ~= nil
script.Parent.Adornee = game.Workspace.StartMenuArea.Room.Board
There is another script within it; an ImageButton in the SurfaceGui holds it. Upon clicking the ImageButton, it should print "Clicked."
The script inside of the ImageButton:
script.Parent.MouseButton1Click:connect(function()
print("Clicked")
end)
When I test the game, the SurfaceGui is successfully adorned to the part in the Workspace. However, when I click on the ImageButton, "Clicked" is not printed. This confuses me because I thought that when FilteringEnabled was on, you didn't have to worry about using RemoteEvents and RemoteFunctions for the player's GUI, because it is client-sided. So why is this happening?

5 comments
I already tried setting the ZIndex of the button to 10, and yet nothing changed.
Try game.Players.LocalPlayer.CharacterAdded:wait() instead of your repeat until
I just did, and it didn't change anything.
A SurfaceGui would need the events connected using a local script then using a remote to process the users request.
But why would I need to use remotes at all if the SurfaceGui is client-sided?