Good morning!
I am wondering how can I apply a highlight to an invisible player character.
Of Course you have your Highlight around your character like this:
But how can you turn your character fully transparent and only display the highlight.
I am using a local script under StarterPlayerScripts.
local Players = game:GetService("Players")
local player = Players.LocalPlayer
local function addHighlight()
local character = player.Character or player.CharacterAdded:Wait()
if character:FindFirstChild("MyHighlight") then return end
-- Add Highlight
local highlight = Instance.new("Highlight")
highlight.Name = "MyHighlight"
highlight.FillTransparency = 1 -- Fully transparent fill
highlight.OutlineTransparency = 0 -- Fully visible outline
highlight.OutlineColor = Color3.fromRGB(0, 0, 0) -- Black outline
highlight.Adornee = character
highlight.Parent = character
-- Make the character fully transparent
for _, part in pairs(character:GetDescendants()) do
if part:IsA("BasePart") then
part.Transparency = 1
end
end
end
-- apply the highlight and transparency
if player.Character then
addHighlight()
end
player.CharacterAdded:Connect(addHighlight)
Or is there something else similar to Highlight that I can use.