hello, im making a door system for my game, but theyre opening two different directions. i know it had something to do with the CFrame but i have no idea how to make it World instead of Local
ref video
hello, im making a door system for my game, but theyre opening two different directions. i know it had something to do with the CFrame but i have no idea how to make it World instead of Local
ref video
this happened because you just copied and rotated the door
just make the door on the rights x or y be negative, just set x to negative, if it doesnt work do y
yes but the issue is, i have a script for all the doors and im trying to make it work even if i copied it and rotated it
I dont think theres really an easy bypass, if this is like a doors game then maybe group double doors and have 1 script for them.
hmm, i mean i could make try to rotate all the doors to face in 1 direction when the script loads, i have no idea how that’d work, but i could try
couldnt figure it out, still looking for help
Okay, by the looks of it I am guessing your script is using CFrame.Angles to rotate a model from a PrimaryPart.
Since the door is copied and rotated 180, (as others have pointed out), you will get the opposite result for a door facing the opposite direction.
If you absolutely want to keep the doors like this (where there are two doors in one), I think the solution may be to simply reverse the aforementioned CFrame.Angles. This is tedious, but you could then save the now double door as one model, sparing future work.
For example, instead of the angle being (90,0,0,), make it (-90,0,0) A simple reversal.
Hope this helps.
sorry for not responding for a while
Since this is the scripting support forum copy/paste your code here so we can see what’s wrong with it.
Please put 3 backticks (```) before and after your code to format it correctly.
yeah right sorry, but its just a simple CFrame.Angles door
rotate the hinges the other way
We know, but please show us the script and we’ll be able to help you better.
Otherwise we’re just guessing how you’re doing it and just throwing suggestions about how we’d fix it if we were writing the code.
As the other replies have mentioned, you’d really just have to use different logic for each door. There’s no surefire method to know which way you want it to open, so you’d just have to do that for each door independently.
Right click the doors primary part and enable this option.
If the F
is facing the incorrect direction, then rotate the part until it is facing the correct direction.
Add an attribute on the doors that the script reads and use the appropriate angle. For example, for the left door you would have e.g. “OpenAngleOffset” to 90
, and on the right door you would use -90
, and this number can be put in the CFrame.Angles call.