Tween isn't working

Hello! my name is bullet, and I have recently run into an issue, so: let me explain.

The tweenservice just isn’t working, so here are the conditions.

  1. The " Hinge " part is anchored, but the Part the hinges are connected to are not.

  2. The script has no errors, and the rest of it continues to run and works properly.

that is all the conditions, and here is the script:

-- by:  bullettrain5


-- Variables

local Sound = script.Sound

local TweenService = game:GetService("TweenService")
local Door = script.Parent.Parent.Parent.Parent
local Hinge = Door.PrimaryPart

local DoorSwingInfo = TweenInfo.new(1.5, Enum.EasingStyle.Linear)
local PropertyToTween = {Orientation = Vector3.new(0, 90, 0)}

local DoorSwingTween = TweenService:Create(Hinge,DoorSwingInfo, PropertyToTween)


-- Main Code

local function OpenDoor()
	DoorSwingTween:Play()
	Sound:Play()
	script.Parent.MaxActivationDistance = 0
end

-- Function Enablers

script.Parent.MouseClick:Connect(OpenDoor)

Thanks for reading, and please help!

You can’t change the Orientation of a part using Vector3.new().
Change Vector3.new to CFrame = Hinge.CFrame * CFrame.Angles(0, math.rad(90), 0)

2 Likes