Player Outliner // Add a cartoony style to your game's players!

Heya! I created a simple customizable player outliner that takes advantage of the new highlight instance release. Below are some details of the resource.

What does this look like?

By default, the resource will make your characters look like this:

However, you can use the config file to change the transparency and color of the outline!

How do I configure the resource?

In the PlayerOutliner module, you will find another Config module. The contents look like this:

return {
	-- If true, then the outline will be removed when a player dies
	RemoveHighlightOnDeath = true,
	
	-- This is the outline color
	HighlightColor = Color3.fromRGB(0, 0, 0),
	
	-- From 0-1, how invisible the outline is
	HightlightTransparency = 0.5,
	
	-- The name of the outline being created
	HighlightInstanceName = "PlayerOutline",
	
	-- If true, the module will automatically begin adding outlines to the player characters that spawn
	-- Only can do so when require() is called on the module
	CreateOutlinesAutomatically = true,
	
	-- If true, then every part, including accessories, are highlighted
	-- Warning! A max 31 highlight count is in place on Roblox,
	-- only use on small servers.
	HightlightEveryPart = false,
}

You can change these settings to your liking.

Want to integrate the module into your own code or into a framework, such as Yucon Framework? The module works by itself, so you can do that!

Where to get this resource

You can get the resource directly in your inventory! Or, alternatively, you may download the resource as a file.

Get the outliner in your inventory

Or, download it here (3.0 KB)


Hope this resource is helpful for you guys! Thanks for reading :heart:

32 Likes

Quite interesting I wonder would it work for example with an object too (for example a part)?

1 Like

I dont mean to sound rude, but you can do this with this amount of code:

game.Players.PlayerAdded:Connect(function(player)
	player.CharacterAdded:Connect(function(character)
		local outline = Instance.new("Highlight")
		outline.FillTransparency = 1
		outline.OutlineTransparency = 0
		outline.Parent = character
	end)
end)

one more thing to note, with this recourse you can only have a total of 30 players with the outline. Since highlight objects(whats used to make the outline on this module) stop rendering after 31 highlight objects are in workspace

6 Likes

Just checked, and the limit can actually reach 31 objects. I’m actually really disappointed because this limit is way too low for what I was planning to use them for…

oh I thought it was 30 my bad :sweat_smile:

the limit is disappointing. You could maybe clone the player character every render and have it like an outline. But this could cause performance issues.

You should just wait, highlights were released yesterday. Hopefully in a few months we can add more than 31

I was actually planning to use them as border outlines for countries in a Rise of Nations-like game, but obviously there’s more than 30 countries in the world. Hope they increase the limit soon🤞

1 Like

For that, you can just use the highlight instance :smiley:

1 Like

You could still technically use it just it’d be a bit more tedious, you could determine what countries are rendered on-screen then have those instances contain the highlight.

I created my code to be customizable and plug-in-able. For example, the module could easily be put into somewhere else, or customized to add during custom events. The config file as well helps beginner coders easily customize the outline.

You’re right, you can do it with that code, but in short that code isn’t helpful to beginners who would like to learn.

1 Like

You are also able to put the highlight inside StarterCharacterScripts and just customize it there, it does the same thing without any scripts.

This script works with above 31 characters:

local workspaceModel = Instance.new("Model")
workspaceModel.Name = "Players"
workspaceModel.Parent = workspace
local highlight = Instance.new("Highlight",workspaceModel)
game.Players.PlayerAdded:Connect(function(plr)
   plr.CharacterAdded:Connect(function(char)
      char.Parent = workspaceModel
   end)
end)

Not sure if it works though. wrote this on mobile

I would consider this unorganized considering you’re putting an instance in a script bin. It works, but that also is considered bad practice.

I don’t think this works, considering that characters aren’t archivable.

How would this be easier for beginners and easily customizable? While you can achieve the same functionality in less than 10 lines of code? All this is doing is inserting an instance.

In fact, this method of doing this would be harder for beginners. If a beginner finds creating an instance hard, than it’s a them problem rather than a code problem.

2 Likes

What does archivable have to do with parent?

I highly agree, people like this because this guys famous. If a normal guy releases this, they would get a ton of hate

1 Like

archivable is weather or not the model can be cloned.

I did not clone the character, just parented jt

Updates

More efficient highlight method

To prevent highlights from going beyond the limit, all characters are put into a single model (as proposed by @commitblue’s code demonstration) . This means one highlight instance is used for all, rather than one each.

Per-part highlighting

Per personal request, I’ve added an option to highlight each part individually in the character. Be warned: this should only be used for singleplayer or co-op games to prevent going over the highlight limit!

2 Likes

But dont expect it to be a “perfect replacement”, read this Increase the highlight rendering limit or remove it (skip to workaround)

1 Like

The workaround’s bug is minor would be preferred over having a limit.

I believe its intended. Just wait for engineers to listen to the feature request
Anyway, you should probably read the posts above