trying to make a score leaderboard and I get this error i modified a kills and death leaderboard online, so thats how i got this code.
game.Players.PlayerAdded:connect(function(plr)
local leaderstats = Instance.new("IntValue",plr)
leaderstats.Name = "leaderstats" -- dont change the name or else it will not work!
local Death = Instance.new("IntValue")
Death.Name = script.DeathsName.Value -- The Value with be in the script
local Kills = Instance.new("IntValue")
Kills.Name = script.KillsName.Value -- The Value with be in the script
local score = Instance.new("IntValue")
score.Name = "Score"
score.Parent = leaderstats
plr.leaderstats.score.Value = Kills * 10 - Death * 5
end)
may someone help me with this code?

1 comment
connect is deprecated. Use Connect