ServerScript
local ServerStorage = game:GetService("ServerStorage")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Colours = ReplicatedStorage.Colours
local Factory = ServerStorage.CloneSmith.FactoryNotes
local Generator = require(Factory)
local ModelClass = Instance.new("Model")
ModelClass.Parent = game.Workspace
local NewPart = Instance.new("Part")
NewPart.Parent = ModelClass
-- Create new Model and add a Part inside it
Generator.ColourNotes(ModelClass,Color3.fromHSV(1,1,1))
-- Invoke function from Module
ModuleScript
local module = {}
--[ Variables ]--
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local ReplicatedFirst = game:GetService("ReplicatedFirst")
local ServerScriptService = game:GetService("ServerScriptService")
local ServerStorage = game:GetService("ServerStorage")
--[ Functions ]--
-- Note Colourer, input: Model/Instance, Colour3.Value/Value
function module.ColourNotes(model,colour)
if model:IsA("Model") then -- Errors here, IsA is not a valid member of Color3
local PartsDecendants = model:GetChildren()
for i,v in ipairs(PartsDecendants) do
v.Color = colour
end
end
end
I am copy and pasting the code from the ServerScript to the command bar but it errors, somehow the model I am passing to :IsA() is a color...
