So when working with GUI's I find myself starting to create multiple Remote Events for separate GUI's. What are some ways to conserve space and use fewer RemoteEvents?
Is the only solution with parameters, because if it is I guess I'll have to use them. Also if you could provide examples of changing multiple GUI's with one remote event that'd be helpful! "D
My best guess on this issue is having one of the parameters being which GUI it is trying to call. Since I don't know 100% exactly what you want but can get pretty close to it, I guess this might probably be a great fix.
Try something like this:
--LocalScript script.Parent.OpenStoreButton.MouseButton1Click:Connect(function() script.Parent.Visible = false --Assuming your script is in the GUI LocationOfYourEvent:FireServer(game.Players.LocalPlayer.PlayerGui.NameOfGui) end) --When the "OpenStore" button is clicked it creates a function
and...
--Script LocationOfYourEvent.WhateverEventYourUsing:Connect(function(Plr, GuiToOpen) GuiToOpen.Visible = true end)
Although this is what you wanted, the simpler fix is that you don't need to call a script to do the work. Since it's only visible to the player you should just use a local script to change the visibility of those GUIs.
--LocalScript script.Parent.OpenShopButton.MouseButton1Click:Connect(function() script.Parent.Parent.ShopGui.Visible = true --Assuming you put your GUIs together end)
There you go, simplified even more and nothing much to do.
If you have any questions or issues, please contact me. ;)