Using the mouse to open a door

I made a CFrame based door and I want to keep it like that. So this means drag detectors are out of the question and I can’t use those. I still want to replicate the behavior of drag detectors however and have the mouse move the door.

The only issue is that this is somehow more difficult then I anticipated. My solution was to use mouse delta to move the door but you need to keep dragging in 1 direction so you end up looking far away from the door when it’s fully open.

The door is controlled by an attribute named TargetAngle in case this is info is helpful

-- example code to open the door half way
Door:SetAttribute("TargetAngle", 45)

You are trying to get the same system they use in a dusty road trip (or something like that), right?

I’m thinking more of the doors from Amnesia or how drag detector functions. Pretty sure the doors from dusty road trip uses mouse delta to make that work.

1 Like

Better use hinge constraints on unachored door base, it might help or, you can use my system.

2 Likes

Why did you decide to handle change of AlignOrientation/AlignPosition in the server despite player being the network owner?

It’s probably typo or I forgot to remove it.