Jump to content

Send info


Captain Cody

Recommended Posts

Posted

How would I send info from a server side script to client side script?

Example -

Shop script, as you upgrade stuff it increases total cost and stuff server side, how would I transfer that to client side "Gui"

Posted

Anubhav is correct. Although, using lots of element data is not the best practice. When you set element data, it sends it to every client on the server. So if you want to sync it for one specific player, element data usually isn't the best way to do so. triggerClientEvent and triggerLatentClientEvent are what you should be using. But don't use something like setTimer(function () triggerClientEvent(player, "syncThisTable", player, massiveTable) end, 500, 0). That would basically be DoSing your players. You are better off creating a series of custom events (or something like that) to only sync the data when it changes.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...