So, I have been learning OOP, and this was my first time trying to actually make something work. This script changes the Color of a part, but I made it with OOP, let me know what I can improve on.
local Color = {}
Color.__index = Color
function Color.NewPart(part : BasePart)
local self = setmetatable({}, Color)
self.part = part
return self
end
function Color:changeColor(color : Color3)
self.part.Color = color
end
local Part = Color.NewPart(workspace.SpawnLocation)
Part:changeColor(Color3.new(1, 0, 0.159243))