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

How to make a item that give you a random leaderstats value when you click?

Asked by 3 years ago
Edited 3 years ago

local price = 1 local db = true local Strings = {'Scrap', 'Plank','Rubber'} local x = Strings[math.random(1, #Strings)] print(x) script.Parent.ClickDetector.MouseClick:connect(function(player) player.hiddenstats:FindFirstChild(x).Value = player.hiddenstats:FindFirstChild(x).Value + price db = false script.Parent.Transparency = 1 script.Parent.CanCollide = false wait(75) script.Parent.Transparency = 0 script.Parent.CanCollide = true db = true end end)

this is my script for it

0
do you have inside "hiddenstats" IntValues named 1,2,3 ? jerryisgod29 176 — 3y
0
no but it is in the player per_chuk 17 — 3y

Answer this question