I’m convinced that a quicker way of writing this exists, and although the method I used does technically work fine with larger applications it becomes extremely tedious but I have always wrote each line individually. I’ve tried looking around for it but have no clue where to start or what I’m really looking for but I’m trying to link two values together.
Ex. This turning into
if Door.Orientation.Y == 0 then Door.LinearVelocity.VectorVelocity = Vector3.new(-2,0,0) end
if Door.Orientation.Y == 90 then Door.LinearVelocity.VectorVelocity = Vector3.new(0,0,2) end
if Door.Orientation.Y == 180 then Door.LinearVelocity.VectorVelocity = Vector3.new(2,0,0) end
if Door.Orientation.Y == -90 then Door.LinearVelocity.VectorVelocity = Vector3.new(0,0,-2) end
this (horrible example im aware it doesnt work exactly like this and im missing a lot)
0 = Vector3.new(-2,0,0)
90 = Vector3.new(0,0,2)
180 = Vector3.new(2,0,0)
-90 = Vector3.new(0,0,-2)
let me know if I’m being stupid, or if you know what I’m talking about