My MouseClicked GUI script isn't working?
Screen.MouseButton1Click:connect (function() for _,v in pairs (game:GetService ("Players").LocalPlayer.PlayerGui) do v:Destroy() end end)
Any help?
I placed a TextButton in a StarterGui, yet it still doesn't work.
wait(0.1) -- Waiting a split second at beginning of local script is required, because local scripts tend to load earlier than GUIs and then they throw a random error Screen = [Please do define this] Screen.MouseButton1Click:connect (function() for _,v in pairs (game:GetService ("Players").LocalPlayer.PlayerGui:GetChildren()) do v:Destroy() end end)