We use cookies on this site to enhance your user experience

Sep 14 2018, 4:41 PM PST

local function onPlayerAdded(player)
	player.CharacterAdded:Connect(onCharacterAdded)

	-- Add leaderboard functionality for each player
	local leaderstats = Instance.new("Folder", player)
	leaderstats.Name = "leaderstats"

	-- Add destroyed enemy count
	local enemyCount = Instance.new("IntValue", leaderstats)
	enemyCount.Name = "Score"
	enemyCount.Value = 0

end)