OUTLINE ON PLAYER
have u ever trying to add outlines on your character in your game but it wont work, it actually pretty easy!
-
Step 1: Add Server Script inside ServerScriptService

-
Step 2: Add Player Services
local Players = game:GetService("Players")
- Step 3: Add this below Players
Players.PlayerAdded:Connect(function(player) -- Get player
player.CharacterAdded:Connect(function(character) -- Get Character
end)
end)
all this does is getting the player character
- Step 4: Add this inside Below the Player.CharacterAdded
Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(character)
local Highlight = Instance.new("Highlight")
Highlight.Parent = character
end)
end)
This will give the player the normal highlight effect, we need to change its property
- Step 4: Setting the highlight property
we have 2 option, the first one is the normal and the easy one:
Highlight.DepthMode = Enum.HighlightDepthMode.Occluded;
Highlight.Enabled = true;
Highlight.FillColor = Color3.fromRGB(0,0,0);
Highlight.FillTransparency = 1;
Highlight.Name = "Outline";
Highlight.OutlineColor = Color3.fromRGB(0,0,0);
Highlight.OutlineTransparency = 0
or the 2nd option which is the table one like this:
-- Put this above the Player service
local Outline_Prop = {
DepthMode = Enum.HighlightDepthMode.Occluded;
Enabled = true;
FillColor = Color3.fromRGB(0,0,0);
FillTransparency = 1;
Name = "Outline";
OutlineColor = Color3.fromRGB(0,0,0);
OutlineTransparency = 0
}
for this option u need to put this below the highlight variable
for val, prop in pairs(Outline_Prop) do
Highlight[val] = prop
end
This should the full script:
local Players = game:GetService("Players")
local Outline_Prop = {
DepthMode = Enum.HighlightDepthMode.Occluded;
Enabled = true;
FillColor = Color3.fromRGB(0,0,0);
FillTransparency = 1;
Name = "Outline";
OutlineColor = Color3.fromRGB(0,0,0);
OutlineTransparency = 0
}
Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(character)
local Highlight = Instance.new("Highlight")
Highlight.Parent = character
for val, prop in pairs(Outline_Prop) do
Highlight[val] = prop
end
end)
end)
and there you have it, a outline

