I'm making a pizza cooker that cooks the pizza once assembled but I'm getting an error that causes the pizza to not cook like it does not wanna change the dough color and doesnt wanna change the transparency for the toppings and I can't fix the problem I've tried redoing the script but this is what pops up on the game console: line 19: bad argument #3 (Color expected, got BrickColor) Stack Begin Script, line 19 - function tch Stack End
This is the code.
--//
--SavageDarry--
--//
Base = "Dough"
MainSound = "128216507"
SecondSound = "128216507"
Action = "Cook"
function Main()
script.Parent.Sound.SoundId = "http://www.roblox.com/asset/?id="..MainSound
script.Parent.Sound:Play()
end
function tch(y)
if y.Parent.Name == "Raw Cheese Pizza" then
Main()
y.Parent.Name = "Cheese Pizza"
y.Parent.RawDough.Color = BrickColor.new("Br. yellowish orange")
y.Parent.CookedCheese.Transparency = 0
y.Parent.UncookedCheese.Transparency = 1
print("Cooked Cheese Pizza")
end
end
script.Parent.Touched:connect(tch)
function tch(y)
if y.Parent.Name == "Raw Cheese Pizza w/ Onions" then
Main()
y.Parent.Name = "Cheese Pizza w/ Onions"
y.Parent.RawDough.Color = BrickColor.new("Br. yellowish orange")
y.Parent.CookedCheese.Transparency = 0
y.Parent.UncookedCheese.Transparency = 1
print("Cooked Cheese Pizza w/ Onions")
end
end
script.Parent.Touched:connect(tch)
