Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I compare vector3 values?

Asked by 10 years ago

velo = BodyAngularVelocity

if steer.Steer == 0 and driftdirection == "left" then
                repeat
                wait(.5)
                velo.angularvelocity = velo.angularvelocity + Vector3.new(0,-.1,0)
--[[The Problem is after the Or]]--->   until steer.Steer ~= 0 or velo.angularvelocity == Vector3.new(0,0,0)
                    if velo.angularvelocity <= Vector3.new(0,0,0) then
                        velo.angularvelocity = Vector3.new(0,0,0) --[[Up to here]]
                    end
        end
0
I'm not sure but you may have to compare each Vector3 value separately. like: velo.angularvelocity.x <= 0 jav2612 180 — 10y
0
Oh, okay that's fine. That'll work too. Thanks! Orlando777 315 — 10y
0
Wait, it doesn't acknowledge the Y value. I wrote angular.Y <= 0 then [[something]] and it wont work :/ it keeps going -.1 Orlando777 315 — 10y
0
Nvm Fixed it. Orlando777 315 — 10y

Answer this question