RGB OutlineColor not properly working

hi there so i have a issue with my RGB outlinecolor script portion that won’t let me do a while loop inside of a elseif statement all it does is counts the kills and then makes it go RGB once it gets 10 or above

			elseif count >= 10 then
				Sounds.Kill5:Play()
				local highedit = Humanoid.Parent:WaitForChild("Highlight")
				
				local t = 5
				while wait() do
					local hue = tick() % t/t
					local color = Color3.fromHSV(hue,1,1)
					highedit.OutlineColor = color
				end
			elseif Humanoid.Died then
				count = 0
				highlight:Destroy()
			end
		end
	end
3 Likes

I’m pretty sure making a function and then calling it would work.

okay ill try that, give me a moment

i tried making it into a function outside of the scope, and tried calling it inside the elseif, it didnt change

replace while wait do() with while task.wait() do

still doesnt do anything, i think its because we’re trying to do a color3.new and it wont accept .fromhsv maybe? i dont really know

below the variable color, put print(“Loop working”) and if its prints its something to do with the color and if it doesn’t it’s the loop

i think its the loop, i dont know why its not working really, it functionally should? but its not printing anything either, so its most definitely the loop

Below this print something to make sure its actually reaching the loop in the first place(P.S remember to break the loop after end

so it doesnt even get to the print either, it just waits for the uh, highlight, but its already there after the first kill or so, and it wont go past the sound i dont think, to confirm it does not go past the sound for some reason, it just does that and nothing else

So your loop is most likely working and its something else in your script i cannot see lol

i think i figured it out, so i had count >= 5 change the color, and that applied for everything else above 5 too, so that gets rid of the RGB entirely, and switches to red

Alr try it out, if it works close the post if it doesn’t tell me errors

yea no what i just did worked like a charm, and its honestly my fault LOL i shouldnt have posted without checking first, but hey atleast we figured it out, thank u so much ill give u a solution

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