Highlight doesn't change color for StartCharacter

so my startcharacter has small cool feature which is highlight can change color
but when I put it into starterplayer, the script that change highlight wasn’t worked

anyone help me how to fix highligh doesn’t change color

while task.wait() do
	script.Parent.Highlight.OutlineColor = Color3.fromRGB(189, 82, 255) -- 1
	wait(1)
	script.Parent.Highlight.OutlineColor = Color3.fromRGB(160, 83, 255) -- 2
	wait(1)
	script.Parent.Highlight.OutlineColor = Color3.fromRGB(137, 83, 255) -- 3
	wait(1)
	script.Parent.Highlight.OutlineColor = Color3.fromRGB(123, 83, 255) -- 4
	wait(1)
	script.Parent.Highlight.OutlineColor = Color3.fromRGB(99, 85, 255) -- 5
	wait(1)
	script.Parent.Highlight.OutlineColor = Color3.fromRGB(82, 105, 255) -- 6
	wait(1)
	script.Parent.Highlight.OutlineColor = Color3.fromRGB(82, 137, 255) -- 7
	wait(1)
	script.Parent.Highlight.OutlineColor = Color3.fromRGB(82, 174, 255) -- 8
	wait(1)
	script.Parent.Highlight.OutlineColor = Color3.fromRGB(82, 137, 255) -- 7
	wait(1)
	script.Parent.Highlight.OutlineColor = Color3.fromRGB(82, 105, 255) -- 6
	wait(1)
	script.Parent.Highlight.OutlineColor = Color3.fromRGB(99, 85, 255) -- 5
	wait(1)
	script.Parent.Highlight.OutlineColor = Color3.fromRGB(123, 83, 255) -- 4
	wait(1)
	script.Parent.Highlight.OutlineColor = Color3.fromRGB(137, 83, 255) -- 3
	wait(1)
	script.Parent.Highlight.OutlineColor = Color3.fromRGB(160, 83, 255) -- 2
	wait(1)
end

wdym I don’t post “memes” or “shitposts”
I was just need help

1 Like

You need to put the script into StarterCharacterScript for it to work.
You can also use the following code (bellow) as it is simpler. However, if you’re looking to make a rainbow Highlight, I highly recommend to use a tween instead.

local Highlight = script.Parent:WaitForChild("Highlight", 60)
local HighlightColor = {
	[1] = Color3.fromRGB(189, 82, 255),
	[2] = Color3.fromRGB(160, 83, 255),
	[3] = Color3.fromRGB(137, 83, 255),
	[4] = Color3.fromRGB(123, 83, 255),
	[5] = Color3.fromRGB(99, 85, 255),
	[6] = Color3.fromRGB(82, 105, 255),
	[7] = Color3.fromRGB(82, 137, 255),
	[8] = Color3.fromRGB(82, 174, 255),
}

while true do
	for Count = 1, #HighlightColor, 1 do
		Highlight.OutlineColor = HighlightColor[Count]
		task.wait(1)
	end
	
	for Count = #HighlightColor - 1, 2, -1 do
		Highlight.OutlineColor = HighlightColor[Count]
		task.wait(1)
	end
end
2 Likes

Please read whole comment instead of being triggered from the tamest judgment this the hell of a code could get
Also please provide errors in output becouse that not possible to judge or predict anything known such little information
I still think that you are rofling becouse it cant be real :wilted_flower: :headstone:
Anyway if you are looking for rainbow effect there is a simple formula for that:

Color3.fromHSV(os.clock() % 1,1,1)

if you want to slow it down you can:

0.05*os.clock()%1

sorry for didn’t respond since I don’t on laptop
but thank you for solve this problem <D

1 Like

Being a beginner is not a sin, but being rude and assuming the worst of a person is.

3 Likes

You seem to completely miss my point and already assume, as you quote:

Being a beginner is not a sin, but rushing into production while not knowing any basics and disappointing people isn’t great either.

What I meant by that is people nowadays completely do not understand that you “can’t work on a nuclear power plant without education.”
People want to do everything while absolutely never training for it.
I didn’t explain previously what I meant, so I guess it was fair of you to assume that, and now I hope that you understood what I meant from the beginning.
I, for example, was not touching anything in the first year or so and was actively studying API and language to not make a half-working product in the end.

Conclusion: Be more self-critical and question yourself more, such as, “Maybe I should train more before going into production.”

You accused them of “shitposting” and “writing the worst code.” I didn’t assume, but I did read.

What production? OP is in Studio.
Who do you think OP disappointed by simply asking for help? This isn’t a company meeting.

By production i refer to publishing game/plugin/model etc

Production usually means making a product in a professional setting.

If not in a professional setting, and OP is making a game to learn, then where’s the problem?

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.