What do you want to achieve? Keep it simple and clear!
I want the door to change orientation to make it look like its open.
What is the issue? Include screenshots / videos if possible!
I’v managed to make the door change orientation to my desired but I’m facing a problem where the whole model moves its position to what seems to be in the middle of the baseplate
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
Yes I have and I personally didn’t find anything. I do not know where to start to fix this problem.
Before Clicking:
After Clicking:
local GetDetector = script.Parent.Parent.Door.ClickDetector
local model = script.Parent.Parent
GetDetector.MouseClick:Connect(function()
model.PrimaryPart.CFrame = CFrame.fromOrientation(0,-90,0)
end)
youre not changing the orientation of the cframe of the door your changing position using cframe orientation, try using cframe.angles. Theres also the new DragDetectors that could better suit your use
I made a mistake with my explanation, i was saying use cframe.fromOrientation and input it into cframe.Angles somehow, Im still thinking tho hold on let me cook