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

How to increase 2 IntValues from leaderboard at once?

Asked by
n_ubo 29
5 years ago
Edited 5 years ago

heres what i want:

01local Players = game.Players
02 
03local Template = Instance.new 'BoolValue'
04Template.Name = 'leaderstats'
05 
06Instance.new('IntValue', Template).Name = "Kills"
07Instance.new('IntValue', Template).Name = "Deaths"
08Instance.new('IntValue', Template).Name = "Bux"
09 
10 
11Players.PlayerAdded:Connect(function(Player)
12    wait(1)
13    local Stats = Template:Clone()
14    Stats.Parent = Player
15    local Deaths = Stats.Deaths
View all 37 lines...

what i try to do is increase 2 int values from the leaderboard when a kill is made but is there another instance than findfirstshild so that i can increase both instead of 1?

0
"Template" is never given a parent. Therefore, Template and its descendants remain in thin air. DeceptiveCaster 3761 — 5y
0
the script still works fine to me n_ubo 29 — 5y
0
only bux value won't increase after kill event n_ubo 29 — 5y

1 answer

Log in to vote
0
Answered by
Robowon1 323 Moderation Voter
5 years ago

the r in math.random isn't capitalized

0
-1 for posting incomplete answer, this fits as a comment therefore it belongs as one. Additionally, please remove the unjust downvote you have given to my answer here; https://scriptinghelpers.org/questions/90264/to-many-upvalues-error-how-to-simplify programmerHere 371 — 5y
Ad

Answer this question