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

2 comments

0

do you have inside "hiddenstats" IntValues named 1,2,3 ?

0

no but it is in the player