How to add money without remote events?

Is there a way for add money without remote events?
I want to know because i want secure my game from exploiters.

Could you explain why you were using a remote event to give money? Does your game even require any client input for this? Please elaborate

Your post is a bit empty. What do you mean by money? Are you talking in game currency using leaderstats or what?

Yes, i want to add leaderstats money.

I’m new at scripting and you know if i add money with a local script it’s not server-sided.
But If i use remote event exploiters can fire this event.

But why are you using a local script?

No, i’m not using localscript. I’m using Remote Event but it’s not secure.

What are you adding money for?

The only way to do this would be to handle money adding on the client. This however makes it far more easier for an exploiter to alter their amount of money and leaves it far more vulnerable. The only secure way to add money and alter their cash would be to handle it all on the server and use remote events to communicate between client and server

For everything. Not for a one thing.

But why are you using a remote event? Can’t you just use a server script without a remote?

1 Like

You would need to use remote events for store functions if you have a UI as you shouldn’t handle UI events and controls on a server script

OP never specified it was for a UI—not good to assume what they are doing.

I am just assuming this because he is talking about altering a players cash, presumably when they purchase an item or if they click a button.

If I can ask, how do you add your money? Is it when a condition is met or do you just have a RemoteEvent called “AddCash” then just increase the cash when it is fired?

It really depends on the context. There should be no need for using local scripts to increase values of money. Unless the player is doing something to get money, than that’s where remote events come in.

Well, if you use DataStore2 it would be easy, let me know if you do.

Yes. But i found a new way. I’m Creating a new remote event in script and firing when i needed.

I’m really not sure what everyone here is saying. There is one simple rule at play here, never trust the client. On Roblox, RemoteEvents and RemoteFunctions are the ways in which you facilitate client-server (and inversely) communication. Leaderstats money, as far as I can possibly think or imagine, should NEVER be handled client-side. Please explain exactly what you are trying to do, if you are trying to update a Player’s money via a client-side interaction (i.e. GUI), use a RemoteEvent or RemoteFunction.