SIeepyDeveIoper here representing the Learning Resources group!
https://x.com/LearnOnRoblox
Do you want to make your character stand out with glowing and RGB effects? This guide will show you how to create it! This feature is perfect for party or dance games.
First, go to StarterPlayer
> StarterPlayerScripts
in your Explorer panel. Right-click and insert a LocalScript
. Paste the following script into it:
local player = game.Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local function createHighlightForPart(part)
local highlight = Instance.new("Highlight")
highlight.Adornee = part
highlight.Parent = part
local hue = 0
task.spawn(function()
while highlight.Parent do
local color = Color3.fromHSV(hue, 1, 1)
highlight.FillColor = color
highlight.OutlineColor = color
hue = hue + 0.01
if hue >= 1 then hue = 0 end
task.wait(0.1)
end
end)
end
local function highlightCharacter()
for _, part in pairs(character:GetDescendants()) do
if part:IsA("BasePart") then
createHighlightForPart(part)
end
end
end
highlightCharacter()
character.ChildAdded:Connect(function(child)
if child:IsA("BasePart") then
createHighlightForPart(child)
end
end)
player.CharacterAdded:Connect(function(newCharacter)
character = newCharacter
highlightCharacter()
end)
How the Script Works
-
Highlights Each Part: Loops through all parts of the player’s character and applies a glowing highlight effect.
-
Dynamic RGB Colors: The script cycles through colors using
Color3.fromHSV
, creating a smooth RGB animation. -
Updates in Real Time: It automatically applies highlights to new parts added to the character.
Pre-Made Model
- If you’re lazy, here’s the model link: https://create.roblox.com/store/asset/85159017378568/RGB-Players
Just insert it into your game and enjoy the RGB effect!
Showcase
- Here’s a quick preview of how this looks in action: