print(camera:WorldToViewportPoint(Torso.Position)) if camera:WorldToViewportPoint(Torso.Position) then end
When I print it, it gives me a Vector3 value and a Bool value. How do I check the bool value for the if statement? If I do == true then it doesn't work because it is equal to a vector3 and bool.
When a function returns multiple values, you'll have to make a variable for each value.
local FirstVal, SecondVal = camera:WorldToViewportPoint(Torso.Position)
Now, both values are individual and can be used in the if statement. if you want to use the vector3 in the if statement, that will be the first value and the bool value will be the second value.