So in a game I am making I have a lederstat named "Toads" that is suposed to increase everytime you click with a custom made tool named "Mushroom" but for somereason it does not work.
Here are my scripts related to my leaderstats:
function playerAdded(plr)
local stats = Instance.new("IntValue", plr) stats.Name = "leaderstats"
local money = Instance.new("IntValue", stats) money.Name = "Toads" money.Value = 0
end
game.Players.PlayerAdded:connect(playerAdded)
tool.Activated:Connect(function() game.Players.Player1.leaderstats.Toads.Value = game.Players.Player1.leaderstats.Toads.Value + 1 end)

1 comment
i'm sorry if i can't teach you, but i haven't mastered the english yet, so for now i can only fix your script.