Remote event question

Heya!

So im currently using remote events to add to a players stats.

Im doing this in a remote event which is called from a OnClientEvent in a local script and fired on a server script. Does this add the stats or does it need to be vies versa?

what lol

you can only use OnClientEvent in local scripts
you can only use OnServerEvent in server scripts

you can only FireServer() in local scripts
you can only use FireClient() or FireAllClients() in a server script

is that what you’re asking?

2 Likes

I think you have it reversed. You would want the stat updated on the server, so localscript would FireServer and server script would OnServerEvent, do something.

make sure you are adding player stats on the server side since it’s more secure and less exploitable that way

So, you would do fireserver() on the client and OnServerEvent to add the player stats on the server

Documentation can help you