I am trying to give items as players get to certain levels. I am stuck on the code, and can't seem to get the Player and player leader stats player level to call properly
This is Code I have been working on Thanks for the help in advance.
local player = game.Players:GetPlayers()
local leaderstats = player.leaderstats()
local level = leaderstats.level()
local tool = game.ServerStorage.LinkedSword
function onPlayerSpawned(player)
if player:Level (level) >= 1 then
tool:Clone().Parent = player.Backpack
end
end
game.Players.PlayerAdded:connect(function(player)
player.CharacterAdded:connect(function()
onPlayerSpawned(player)
end)
end)

1 comment
Use a code block. https://forum.scriptinghelpers.org/topic/82/how-to-format-questions-answers-on-the-main-site