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

How can I raise the player stats value by more than just 1 at a time, ex: raise stat by 20 ect?

Asked by 4 years ago
Edited 4 years ago

local args = { [1] = game:GetService("Players").LocalPlayer.Data.Prestige, }

game:GetService("ReplicatedStorage").Events.RaiseStat:FireServer

0
That script doesn't raise the stat, User#30567 0 — 4y
0
that is just a complicated way of doing nothing omgdodogamer 11 — 4y

1 answer

Log in to vote
0
Answered by 4 years ago
Edited 4 years ago

you should do something like this:

--Create the stat
leaderstats = Instance.new("Folder")
leaderstats.Name = "leaderstats"
leaderstats.Parent = game.Players.LocalPlayer
Prestige = Instance.new("IntValue")
Prestige.Parent = leaderstats
Prestige.Name = "Prestige"
Prestige.Value = 0 --any value that you want it to start with

--Add to it
Prestige.Value = Prestige.Value + 20 --amount that you want to add

hope this helped!

Ad

Answer this question