I'm trying to make a script that will fire the client on a remote event when you click a textbutton of a surfacegui to make a localscript run. When I try to click the texbutton, the only thing the output gives is "Argument 1 missing or nil" and nothing else. I've tried for hours putting things in different locations but nothing has worked. Here is the script:
local ReplicatedStorage = game.ReplicatedStorage
local Button = game.Workspace.GUI.SurfaceGui.SoundID
function clicked(player)
ReplicatedStorage.ShowGUI:FireClient()
end
Button.MouseButton1Click:Connect(clicked)
Any help is appreciated!

5 comments
I just adding that stuff to the script and now I got a new error. The output now says "FireClient: player argument must be a Player object - Server - Click:5"
oh it does?
i will update the script
ok try with this updated script
Now it works! Thanks for your help!