Hi,
my friend have new scripter, but when i gived him some work to test him, he puted (server) scripts to GUIs, so he musnt use remote events, something tells me, that it isnt best idea, but how bad it is?
Edit: (use case is GUI shop in players GUI folder)
1
2
3
4
5
6
7
8
9
10
0voters
(1 = really bad, 10 = really good)
Edit 2: The poll is how good its compared to local script and remote event.
Local scripts could take off some stress on the server. Although, global scripts are easier and won’t cause that many problems with the server as long as it is pretty simple. It honestly depends on what you’re doing.
Agreed with what @Twisted12Gaming is saying. Let the clients handle the shop GUI, and send any buy/sell requests through remote events. The server should then handle the actual transaction to prevent cheating.
It shouldn’t be that bad for the server and make it that laggy. Although, if the server is already stressed a lot from other game functions, then I would make the client handle most of the GUI.
Scripts won’t work on a player’s PlayerGui. Also, if it’s something that has to do with clicking a button, it has to be the client sending a remote. The activated event on TextButtons only fire on the client, the client should also be handling stuff in the PlayerGui. Even though the server can see a player’s PlayerGui, the server should never ever be touching it.
Server scripts only run if they are a descendant of the Workspace, ServerScriptService or a Backpack. If they do work in the PlayerGui, then that is most probably a bug, and will probably be fixed in the future.
You should only use Local scripts for guis no matter what. Server scripts are unnecessary. The only time a server script comes to play is through a remote event where the server communicates to a local script, but the server script would be located in the server script service or the workspace, never the starter gui.
Then it’s basically deprecated, and should not be used
Edit: also, if roblox goes against this, it’s probably for a good reason, they created the API and know the internals and what should and shouldn’t be done