New: Nitro Boost our Discord server and receive full donation perks here on the website! Join the Scripting Helpers Discord Server to learn more! You can also Support on Patreon as always.
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 3 months ago
Edited by DanzLua 3 months 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 — 3mo
0
Did not work Already try'd that. Error0fdeath 17 — 3mo
0
Do you want to change the color or move a model? pastel_joga 32 — 3mo
0
color Error0fdeath 17 — 3mo

1 answer

Log in to vote
0
Answered by 3 months 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 — 3mo
Ad

Answer this question