Ad
Still have questions? Join our Discord server and get real time help.
Log in to vote
0

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

Asked by 23 days ago
Edited by DanzLua 23 days 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 69 — 23d
0
Did not work Already try'd that. Thor_lnfinlty -5 — 23d
0
Do you want to change the color or move a model? pastel_joga 32 — 23d
0
color Thor_lnfinlty -5 — 21d

1 answer

Log in to vote
0
Answered by 23 days 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 pastel_joga 32 — 21d
Ad

Answer this question