Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I Fire a server event to only a selected player?

Asked by
Catr899 12
3 years ago
game.ReplicatedStorage.BuyIcon1.OnServerEvent:Connect(function(plr)
        print(plr.Name.." wants to buy a icon")
        plr.leaderstats.Coins.Value = plr.leaderstats.Coins.Value - 150
    end)

When this gets fired buy someone clicking a gui to buy an item it takes coins from all of the players

I need it to minus coins from only the player who is trying to buy the item

0
I use remoteevents all the time and it doesn't do that for me, maybe send the script that fires the remoteevent. Seraphicu 11 — 3y

Answer this question