So basically I want my door to rotate smoothly… I am very new so please be patient with me as I might not get what you are talking about. I want the door to open smoothly using a hinge part with CFrame (I named it Center) It opens when you walk into the hitbox (the hitbox works its just the door doesn’t)
The door doesn’t work with the hinge for some odd reason. I have the Center part (hinge) set to the Model as the primaryPart. I also have the center part with a WeldConstraint. Part0 is set to the Door and part1 is set to the center part. The center part is also anchored but the Door is not. I am not really sure what the problem is…
I have looked at some other people who had this problem but I couldn’t really find anything that could help me.
I am not asking for anyone to write me a whole other script, I need to know what I could possibly change in my script that could make the door move.
local debounce = false
script.Parent.Detector.Touched:Connect(function(hit)
if hit.Parent:WaitForChild(“Humanoid”) then
end
if debounce == true then return end
debounce = true
if door == “closed” then
tween:Create(CF, TweenInfo.new(0.5, Enum.EasingStyle.Back, Enum.EasingDirection.In,0,false,0), {Value = center.CFrame * CFrame.Angles(math.rad(0),math.rad(90),math.rad(0))}):play()
door = “open”
wait(1)
tween:Create(CF, TweenInfo.new(0.5, Enum.EasingStyle.Back, Enum.EasingDirection.In,0,false,0), {Value = center.CFrame * CFrame.Angles(math.rad(0),math.rad(-90),math.rad(0))}):play()
door = “closed”
end
wait(1)
debounce = false
end)
Do Parts welded to tweened CFramed anchored Parts still move with the CFramed Part?
I’ve used HingeConstraints for doors since they came out. Fairly simple system really.