Why did it unbind thrice, while the line above it only printed once? I would have expected it to only unbind once as well. I also did ctrl shift f, and this is the only unbind with this name.
function module.RemoveHighlight(part)
print(part, CommonlyUsedVariablesModule.numberSelected)
if boxes[part] == nil then
return
end
CommonlyUsedVariablesModule.numberSelected -= 1
if inputCylinderReturnArrayOfTwoJoints[part] ~= nil then -- cylinder
revertThe1of2from3("Color", part, partColorTable)
elseif displayPartReturnsArrayOfTwoBlocks[part] ~= nil then -- displayPart
revertThe1of2from3("Parent", part, partParentTable, displayPartsHighlight)
else -- everything else
revertThe1of2from3("Parent", part, partParentTable, partsHighlight)
end
if attachmentArrowsTable[part] ~= nil then
attachmentArrowsTable[part]:Destroy()
attachmentArrowsTable[part] = nil
end
if CommonlyUsedVariablesModule.numberSelected < 1 then
print(CommonlyUsedVariablesModule.numberSelected < 1)
RunService:UnbindFromRenderStep("highlightsRainbow")
end
end
local t = 8 -- how long it takes to go through the rainbow
local fromHSV = Color3.fromHSV
local function cycleThroughColors()
local hue = (tick()%t) / t
local color = fromHSV(hue, 0.8, 1)
partsHighlight.OutlineColor = color
displayPartsHighlight.FillColor = color
end
Honestly I am not sure, what I can tell you is try to add a debounce to the line 154 function as to prevent it firing more than once, as well maybe changing < to < = (no space)
The warning is telling you that it found three functions bound with the key highlightsRainbow and that it is unbinding all three. If you want to have three different instances being highlighted and be able to unbind them separately, you will need to give a unique key to BindToRenderService for each instance.