1 2 3 4 5 6 7 8 9 10 11
local function isMotor(value) local motorType = tostring(value):match("^Motor%((.+)%)$") if motorType then return true, motorType else return false end end return isMotor