Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How do i fix bad argument #1 to 'new' (Vector3 expected, got BrickColor) ?

How do i make it work when all it saying in output 13:36:48.742 - ReplicatedStorage.Modules.MathModule:44: bad argument #1 to 'new' (Vector3 expected, got BrickColor) And the line of code is this

function module:Color(cr)
	return {cr:BrickColor()}
end
function module:DeColor(cr) 
	
	return CFrame.new(BrickColor.new (unpack(cr)))
end 

Am i doing something wrong or anything?

4 comments

0

Try to change out brick color to Vector3, i may be wrong

0

Did not work Already try'd that.

0

Do you want to change the color or move a model?

0

color

1 answer

✓ Accepted answer
local ocr
function moduleColor(cr)
		ocr = cr.BrickColor
	   	cr.BrickColor = BrickColor.new("Alder")
	end
	function moduleDeColor(cr)
		cr.BrickColor = ocr
	end
moduleColor(workspace.Baseplate)
wait(3)
moduleDeColor(workspace.Baseplate)

1 comment

0

Hope this helps

This discussion is preserved as it was. New answers, comments, and votes are closed.