Hey guys,
So I'm trying to make a part that, when clicked, gives the player a random amount of resources. However, when the part is clicked, nothing happens, but there are no errors. Anyone know whats wrong?
Here's the code: function onclick(player) player.leaderstats.Xp.Value = player.leaderstats.Xp.Value + (math.random(10,50) * (player.leaderstats.Level.Value)) player.leaderstats.Gold.Value = player.leaderstats.Gold.Value + (math.random(250,750)* (player.leaderstats.Level.Value)) player.leaderstats.Shards.Value = player.leaderstats.Shards.Value + math.random(0,1) end script.Parent.ClickDetector.MouseClick:connect(onclick)

1 comment
Code Block please. Is FilteringEnabled Enabled?