Tweening door on hinge not wokring

So basically i have a hinge door. The script is in serverscriptservice and im using it as collection service but i got into a problem that the door doesnt rotate. I watched some videos and that but nothing shows to me what could cause it.

( Added :Play() not workin )

Some screens below.

I have tried some things like changing anchors or smh. Not sure what does it.

Also the code is not full im just trying to fix this and move on.

After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!

local CollectionService = game:GetService("CollectionService")

local door = CollectionService:GetTagged("MS_Door")

for _,door in pairs(door) do
	local hinge = door:WaitForChild("Door").Hinged.HingeConstraint
	print("found higned")
	local tweenService = game:GetService("TweenService")
	local sti = TweenInfo.new(2.3,Enum.EasingStyle.Back,Enum.EasingDirection.InOut)
	local clickmen = door:WaitForChild("ClickDetector")
	
	
	
	clickmen.MouseClick:Connect(function()
		print("clickin")
		local goalopen = {CFrame = hinge.Parent.CFrame * CFrame.Angles(0, math.rad(100), 0)}
		local goalclose = {CFrame = hinge.Parent.CFrame * CFrame.Angles(0, math.rad(100), 0)}
		local tweenopen = tweenService:Create(door:WaitForChild("Door").MainDoor,sti,goalopen)
		print("movin")
	end)
end

Screenshot_65
Screenshot_66

3 Likes

you forgot to add a :Play() after you create the tween. You know, to rotate it. Does it show any errors?

1 Like

Even after i added play it doesnt work. No errors probably something that is not setted properly.

1 Like

Maybe you don’t need the hinge, then… Probably that’s the only problem. Just use a simple weld. Oh, also I’m by no means a good scripter, I’m more of a builder, but for my doors I just welded everything to the hinge and rotated it. Maybe you could also do that.

1 Like

well i did that like all to one main part and the main part to hinge. That doesnt work

Just remembered, the part that you rotate must be anchored. Sorry.

1 Like

Uhhhhh… you helped but its pretty interesting rn… It just rotates how i wanted and goes into ground a bit

I think the goal for closing should also be cframe.angles 0.0.0 so it goes where it used to be. Try changing axes if it goes in the wrong direction, ig.

Its all broken it doesnt even go back… I will try making a new door from scratch. But thanks for help!

I mean you can try my solution, but yeah, that’d work too.