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)