I have an enemy (squirrel) that I want to give exp and gold when killed. This is my leaderboard script:
game.Players.PlayerAdded:connect(function(player)
local stats = Instance.new('IntValue', player)
stats.Name = 'leaderstats'
local level = Instance.new('IntValue', stats)
level.Name = 'Level'
level.Value = 1
local gold = Instance.new('IntValue', stats)
gold.Name = 'Gold'
gold.Value = 0
local experience = Instance.new('IntValue', stats)
experience.Name = 'Exp'
experience.Value = 0
end)
I'm kind of new to Lua.
