Ok, so I am trying to increase my cash script, struggling a lot with the leaderstats stuff.
Here is my leaderstats:
local leaderstats = Instance.new("Folder")
leaderstats.Parent = player
leaderstats.Name = "leaderstats"
local Pets = Instance.new("IntValue")
Pets.Parent = leaderstats
Pets.Name = "Pets"
Pets.Value = 1
local Bucks = Instance.new("IntValue")
Bucks.Parent = leaderstats
Bucks.Name = "Bucks"
Bucks.Value = 0
end)
Here is my part touched script:
if hit.Parent:FindFirstChild("Humanoid") then
local playerr = game.Players:GetPlayerFromCharacter(hit.Parent)
player.leaderstats.Bucks.Value = player.leaderstats.Bucks.Value + 10
end
end
Anyone know what’s up?