Drag Detector Help

It does the same effect as when I did it last night:

08:43:02.553  Current pitch: 89.9599775959419  -  Server - Script:8
  08:43:02.604   ▶ Current pitch: 89.96216325647629 (x2)  -  Server - Script:8
  08:43:02.620   ▶ Current pitch: 89.97084442691138 (x2)  -  Server - Script:8
  08:43:02.636   ▶ Current pitch: 89.98326854101164 (x2)  -  Server - Script:8
  08:43:02.653  Current pitch: 90.00929156174938  -  Server - Script:8
  08:43:02.670   ▶ Current pitch: 90.05949345214897 (x2)  -  Server - Script:8
  08:43:02.687   ▶ Current pitch: 89.89073996832548 (x6)  -  Server - Script:8
  08:43:03.137  Final pitch: 89.89073996832548  -  Server - Script:18

It changes each time.

Tried that and it does it early; what I’m saying is no matter what angle I put it at, it’d always print “Successfully dragged”.

It’s the same with this code as well.

If I remember your trying to make it look a medieval switch or something so it has to go all the way down. I suppose a better way to achieve this effect is to just increase the drag of the drag detector.

Plus getting an extra exact angle is gonna be hard. Especially with this precision. Sometimes this could be skipped.

If ur looking for a quick range then try this:


if pitchInDegrees >= 89.95331133131195 and pitchInDegrees <= 90 then
	print("Successfully dragged!")
end

you are literally back to using old orientation from primary part? why

That’s what I’ve been doing for a while now… all I’ve been doing is editing the script, do you want me to print the pitch of the referenceplane?

Also to keep in mind, I’m gonna pressume the current angle is from a hinge constraint, or motor, but my model doesn’t have that it’s justt the drag detector.

Solved it! By searching in the dragdetector and found “DragFrame”; and made it so when it gets to the desired angle, it prints it; so I managed to solve it now, thank you everyone that helped.

1 Like