ServerRemote affects all clients [PROBLEM]

The problem: I created a function inside a server script (in ServerScriptService) that gives the player 10 points. The function is fired by a remote that’s triggered from a local script example - (player use tool … event fired). The problem is that then the event is fired, not only the player gets their points, but also all the other players in the session.

Server script:

		money.Value = money.Value + 1 * level.Value

Local script:

— some text


— some text

Any solutions?

Make sure to define which player you are giving the money to

plr.Money.Value = money.Value+1*level.Value

Hope that works!

I made a remote that gives players money, I think you can adapt it

Event.OnServerEvent:Connect(function(player, money, amount, level)
    money.Value = money.Value + amount * level.Value


I think that should work :slight_smile:

Roblox recently added the option to do
plr.Money.Value += 1*level.Value

just thought i would share because i think its pretty cool

Just going to point out that doing things like that is very wrong (remote securing wise). You should NEVER trust the client. The amount and level both should be decided by the server, not the by the client. You most probably shouldn’t even create a remote event that just adds money without any checks, the exploiter can simply fire it again and again.

1 Like

The local script - (extension)

    local function GrappleToPosition(position)
    	-- make sure the character exists
    	if not character then
    	-- dont allow grappling while already grappling
    	if grappling then
    	-- fire remote so the server can replicate the effect
    	moneyPay:FireServer() ---- **Here** ----
    	grappling = true
    	-- play the grapple effect on the client
    	GrappleEffect:Play(character, position, Grapple.CastTime, Grapple.TravelTime)
    	-- ez camera tween for more impact
    	local cameraInfo = + Grapple.TravelTime - (game.Players.LocalPlayer.leaderstats.Speed.Value / 100)) / 2, Enum.EasingStyle.Quad, Enum.EasingDirection.In, 0, true)
    	local cameraTween = Services.TweenService:Create(Camera, cameraInfo, {FieldOfView = Camera.FieldOfView + 30})
    	-- cast
    	-- play the cast animation
    	animations.Cast:Play(0.1, 1, 1/(Grapple.CastTime * 2))
    	-- tween the character into position, keeping them floating in the air
    	local castInfo =, Enum.EasingStyle.Quad, Enum.EasingDirection.Out)
    	local castTween = Services.TweenService:Create(root, castInfo, {CFrame =, position)})
    	-- travel
    	-- calculate the landing position and tween to it
    	local direction = (position - root.Position)
    	local travelCFrame = +, 4, 0), position +, 4, direction.Z))
    	local travelInfo =, Enum.EasingStyle.Quad, Enum.EasingDirection.Out)
    	local travelTween = Services.TweenService:Create(root, travelInfo, {CFrame = travelCFrame})
    	-- land
    	-- switch to getting up in case we tripped somehow
    	grappling = false

The game: 95% DISCOUNT!!! l Grapple Hook Simulator - Roblox

Try that:

     local money = plr.Money --change it 
     money.Value = money.Value + 1 *plr.Level.Value

Now - nobody gets their points.

I found the solution - thanks to all :smiley:

I highly recommend to not have a remote that directly alters player money, as exploiters can easily give themselves any amount of money.

Instead, for interactions tell the server that a client as performed an interaction, say for example they’ve sold an item in a shop. Verify that the player is allowed to sell that item, that the item exists in that player’s inventory, and check the value of that item all on the server and change the money from there.

1 Like