Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

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

Asked by 4 years ago
Edited by DanzLua 4 years ago

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?

0
Try to change out brick color to Vector3, i may be wrong Freddan2006YT 88 — 4y
0
Did not work Already try'd that. Corrupt_Wolfstrik3r 51 — 4y
0
Do you want to change the color or move a model? TheMaleWhale_png 82 — 4y
0
color Corrupt_Wolfstrik3r 51 — 4y

1 answer

Log in to vote
0
Answered by 4 years ago
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)
0
Hope this helps TheMaleWhale_png 82 — 4y
Ad

Answer this question