I came across an error and since the 2 scripts are connected I will present them both.
The 1st script showed had no error but the second script had an error of : "Players.frunwiash.PlayerGui.YesGUI.StarterBoosterScript:5: attempt to index nil with 'leaderstats'
1st script :
game.Players.PlayerAdded:Connect(function(player)
local leaderstats = Instance.new("Folder",player)
leaderstats.Name = "leaderstats"
local NoobChips = Instance.new("IntValue", leaderstats)
NoobChips.Name = "NoobChips"
NoobChips.Value = 10000
local Wins = Instance.new("IntValue", leaderstats)
Wins.Name = "Wins"
Wins.Value = 0
local Rank = Instance.new("IntValue", leaderstats)
Rank.Name = "Rank"
Rank.Value = 70
end)
2nd script:
local YesGUI = script.Parent
local YesButton = YesGUI.YesButton
YesButton.MouseButton1Down:Connect(function()
local PlayerChips = player.leaderstats.NoobChips
PlayerChips.Value = PlayerChips + 10000
end)
Please help me find the solution to this answer.

1 comment
local remote = game:GetService("ReplicatedStorage") local event = remote:WaitForChild("Test") game.Players.PlayerAdded:Connect(function(player) local leaderstats = Instance.new("Folder",player) leaderstats.Name = "leaderstats" local NoobChips = Instance.new("IntValue", leaderstats) NoobChips.Name = "NoobChips" NoobChips.Value = 10000 local Wins = Instance.new("IntValue",