Hi I was wondering what type of scripts are best to use in ui design? Specifically an inventory and trading.
You should be using a LocalScript to make changes and edits to it, and either have an IntValue it reads that holds the current value, then have a server script that changes the value so the client can’t change it.
Another option is to use RemoteEvents. However, I prefer the IntValue method.
GUI displays the information the server sends to the client, so you should use local-scripts to control GUI and the server should communicate to the client via remote-events and remote-functions.
Basically , local scripts are client-sided and the things which comes under it includes UI too ! The UI having local script will display all the things that happens not to everyone , just the client . Suppose , we won some cash , so we don’t want that the whole server see it or claim it , so the basic logic is to use local script which will display the prize to the player we want . Suppose we actually won cash , so we can fire a remote event to the client and sending the player object as a parameter. Here it fires the client which is given as a player in parameter . With this basic logic , use local scripts !
Yes! Using LocalScripts makes complete sense for UI! Just keep in mind that anything that runs in a LocalScript only happens for that player, and from the server’s perspective / a networking perspective you can never trust the player. That’s just the nature of the internet. This is important to consider when designing the communication between the client and server for both inventory and trading systems.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.