So basically I need to be able to tell if a value I have is a CFrame or Vector3.
How do I do this?
if value == vector3 then
elseif value == CFrame then
end
So basically I need to be able to tell if a value I have is a CFrame or Vector3.
How do I do this?
if value == vector3 then
elseif value == CFrame then
end
Use typeof
it returns a string.
print(typeof(Vector3.new()))
→ <string, Vector3>
print(typeof(CFrame.new()))
→ <string, CFrame>
In your case you can use
if typeof(value) == "Vector3" then
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.