So, I have been making a door.
I just realized how to fix said door.
I feel like an idiot.
have you tried using a tweening service instead? or is there actual use for the door to have physics?
I can’t tween it, as it is a group. I would need to use either :PivotTo or :SetPrimaryPartCFrame in a tween, which, as far as I know, isn’t possible.
unanchor all but the door and weld everything to the door that should work
I have done that, but it causes some inconsistencies. Either answer the post’s question or just ignore it, please. I am asking how to get the pivot to stop snapping, not how to make a door.
You have to make 2 doors. One of the doors will be invisible, cancollide off and in the open position . As you have already done the welding, you can tween the door when its closed, to the open doors CFrame. Then, when the door is open, tween it back to its original CFrame.
Refer to the previous posts. I am not using Tween, I am using pivot. If you don’t want to answer the question about the pivot, ignore it.
Either way, that wouldn’t work, because the door is made up of multiple parts inside of a group.
Ah man ogorient was set to 0 im so dumb lol
BOOM.
functions.DoorOpenClose = function(RunService, group, pivot, openBool, isOpen, ogOrient)
local openAngle
local extraOpenAngle
openAngle = ogOrient - 90
if isOpen == false then
extraOpenAngle = ogOrient - 90
else
extraOpenAngle = ogOrient
end
local startTime = os.clock()
local openTime = 0.5
local timeElapsed = os.clock() - startTime
local alpha
repeat
if extraOpenAngle ~= ogOrient then
alpha = timeElapsed / openTime
else
alpha = 1 - timeElapsed / openTime
end
group:PivotTo(pivot * CFrame.Angles(0, math.rad(alpha * openAngle), 0))
RunService.Stepped:Wait()
timeElapsed = os.clock() - startTime
until timeElapsed >= openTime
return {openBool, false}
end
(My gosh I’m way too invested in this.)