Player not getting points

Im making a quest system, and I have a working quest,
but the player is not getting points.
Here is the scripts :
LeaderStats

local players = game:GetService("Players")

game.Players.PlayerAdded:Connect(function(player)
	if player then
		local Folder = Instance.new("Folder")
		Folder.Name = 'leaderstats'
		Folder.Parent = player
		
		local Gold = Instance.new("IntValue")
		Gold.Name = 'GoldCoins'
		Gold.Parent = Folder
		Gold.Value = 100
	end
end)

Coin giver script

function Click(player)

player.Folder.Gold.Value = player.Folder.Gold.Value + 100

end

script.Parent.ClickDetector.MouseClick:Connect(Click)

I think this might be part of it.
try this
You made the name of the leaderstats folder “leaderstats” and the name of the gold value “Gold coins”

Coin giver script

function Click(player)

player.leaderstats.GoldCoins.Value += 100

end

script.Parent.ClickDetector.MouseClick:Connect(Click)
1 Like

“Folder” isn’t the name of the folder
and “Gold” isn’t the name of the value

2 Likes