This problem is probably so simple for you guys but I'V BEEN TRYING ON FIXING THIS FOR THE ENTIRE DAY NOW! PLEASE HELP ME.
**game.Players.PlayerAdded:Connect(function(player)
local leaderstats = Instance.new("Folder", player)
leaderstats.Name = "leaderstats"
local Litters = Instance.new("IntValue", leaderstats)
Litters.Name = "Litters"
Litters.Value = 0
end)**
--This script is my leaderboard script, very basic and simple leaderboard script. Idk I'm just putting this here because I thought this will be important
**local Tool = script.Parent
Tool.Activated:Connect(function(player)
game.Workspace["HQ Bloxy Cola Drink Sound"]:Play()
wait(2)
local ToolPosition = Tool:FindFirstChild("Handle").Position
if game.ReplicatedStorage.Trash then
local Trash = game.ReplicatedStorage.Trash:Clone()
Trash.Position = ToolPosition
Trash.Parent = game.Workspace
else
print("It don't work mane.")
end
local Litters = player.leaderstats.Litters
Litters.Value = Litters.Value + 1
end)**
--This is the script for the tool that is suppose to give you +1 for the value of your Litters when activated or clicking the tool.)
--I'v tried so much methods to get this working and I even rewatched the tutorial where I first learned on how to make a leaderboard to check if I made mistakes but I didn't(I don't think.)
--Here is a video where I test it.
Notes:
--You may DM me for more questions or you can just post them here.
--I might give you access to the game(Just don't ruin it please)
--Sice I gave you access to the game, you can give me sugestions or even add stuff as long as I know what you're doing.