script.ChangedFurColor.OnServerEvent:connect(function(plr) if plr.Character:FindFirstChild("SWarriorMorph") then local selectedpart = plr.PlayerGui.Customization.ColorScroll:FindFirstChild("Selected") local bodypart = selectedpart.BodyPartVal local selcolor = plr.PlayerGui.Customization.FurColors:FindFirstChild("SelectedColor").BackgroundColor3 plr.Character.SWarriorMorph:FindFirstChild(bodypart.Value).Color3 = Color3.new(selcolor.r,selcolor.g,selcolor.b) end end)
The output says the error is on line 7 and Workspace.GuiStuff.Customization.FurColor:7:attempt to index a nil value. How do I change a part color3 to a guibutton backgroundcolor3?
script.ChangedFurColor.OnServerEvent:connect(function(plr) if plr.Character:FindFirstChild("SWarriorMorph") then local selectedpart = plr.PlayerGui.Customization.ColorScroll:FindFirstChild("Selected") local bodypart = selectedpart.BodyPartVal local selcolor = Color3.new(plr.PlayerGui.Customization.FurColors:FindFirstChild("SelectedColor").BackgroundColor3) plr.Character.SWarriorMorph:FindFirstChild(bodypart.Value).Color3 = Color3.new(selcolor.r,selcolor.g,selcolor.b) end end)
You needed to make it a Color3.new :)