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

How do I make leaderstat prizes ?

Asked by 6 years ago
Edited 6 years ago

Ive been trying to make someone have a price when they get a certain amount of leaderstat's Value. Here is what I came up with

local Player = game.Players.LocalPlayer
local stats = Player:FindFirstChild("leaderstats"):FindFirstChild("Money")

game.Players.PlayerAdded:connect(function()
    if stats.Value == 2010 then
        game.ReplicatedStorage["AK-47"]
        ["AK-47"].Parent = Player.Backpack
    end
end)

It's a script in Workspace...

0
You should be giving tools on the server and not allowing clients to access them User#5423 17 — 6y
0
I don't think clients will access them, this is on the server. If it were to be on the client side, then yes they would have access to it. You can also put the AK-47 on ServerStorage, so that clients do not download the contents unless called to. liteImpulse 47 — 6y
0
Pretty sure that line 7 has to be "game.ReplicatedStorage["AK-47"].Parent" and, why would you put the parent of AK-47 in the backpack?? Isn't it's parent Replicated Storage??   -- Sorry if it doesnt work, im a beginner. iiDoge_Legend 3 — 6y
0
@iiDogeLegend I'm trying to put it in their inventory... SkatePro888899999 5 — 6y
0
I need an exact script. SkatePro888899999 5 — 6y

Answer this question