I have a table of vector3's and number values how do i distinguish them

I have a table of vector3’s and numbers I need to times these values but to do that i need to find if they are a number value or a vector3 bc u cant times a vector 3 by a number

You can multiply a Vector3 value by a number, also if you mean to distinguish them during each iteration you can do something like this:

local list = ...

for _, value in list do
  if typeof(value) == "Vector3" then
    -- the value is a Vector3
  elseif typeof(value) == "number" then
    -- the value is a number
  end
end

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.