Script works fine in the studio
Publishes no bug version of the script
Goes in-game (private server to check)
Ingame has the bug. Leaves game.
Goes back to the studio, the bug is present again. The script is still the non-bugged version.
Bug Showcase
Publishes fine. Saves fine. Tested in a private server.
No output errors. No other script messes with hair.
The hair should go back to its original color after a transformation, but instead, it goes gray.
Replies would be much appreciated.
Code:
if plr.Character:FindFirstChild("Hair1") then
local haircolor = plr.Character.ImportantCharValues.HairColor.Value
local hair1 = plr.Character.Hair1.Part
local length1=string.find(haircolor,",")
length1=length1-1
local num1=string.sub(haircolor,1,length1)
local length2=string.find(haircolor,",",length1+2)
length2=length2-1
local num2=string.sub(haircolor,length1+2,length2)
local num3=string.sub(haircolor,length2+2,string.len(haircolor))
local convert = Color3.new(num1,num2,num3)
hair1.Color = convert
print("Hair 1 Color :".. num1 .. num2 .. num3)
end
hair.Transparency = 0
if plr.Character:FindFirstChild("Hair2") then
local haircolor2 = plr.Character.ImportantCharValues.Hair2Color.Value
local hair2 = plr.Character.Hair2.Part
local length1=string.find(haircolor2,",")
length1=length1-1
local num1=string.sub(haircolor2,1,length1)
local length2=string.find(haircolor2,",",length1+2)
length2=length2-1
local num2=string.sub(haircolor2,length1+2,length2)
local num3=string.sub(haircolor2,length2+2,string.len(haircolor2))
local convert = Color3.new(num1,num2,num3)
hair2.Color = convert
print("Hair 2 Color :".. num1 .. num2 .. num3)
end
They print the right numbers. (the numbers are from their datastores)
(Only Hair 1 Goes gray, not even black…)