TweenService & CFrame.Angles() not working

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!
    I want the block to rotate 90 degrees. This is for the doors.

  2. What is the issue? Include screenshots / videos if possible!
    I don’t know why, but it doesn’t work, and the attached block doesn’t react to it either, but I can clearly see that nothing is happening.

  3. What solutions have you tried so far? Did you look for solutions on the Developer Hub?

local TweenService = game:GetService("TweenService")
local tweenInfo = TweenInfo.new(1.2, Enum.EasingStyle.Elastic, Enum.EasingDirection.Out, 0, false, 0)

local tymba = game.Workspace.Models1.Tymba
local main = tymba.Main

local detector = main.Detector
local hinge1 = main.hinge1
local hinge2 = main.hinge2
local door1 = main.door1
local door2 = main.door2

local prompt = detector.ProximityPrompt

local openPos = {}
openPos.CFrame = hinge1.CFrame * CFrame.Angles(0, math.rad(90), 0)

prompt.Triggered:Connect(function ()
	TweenService:Create(hinge1, tweenInfo, openPos):Play()
end)
1 Like
  1. Do you got any Errors?

  2. I recommend you to make a clone of you door then do OpenPos.CFrame = CloneDoor.CFrame

No, there are no errors, although it is very strange that it does not work

have you try the number 2? make a clone of the door

Are you sure it will be smooth?

not sure, but try to see if it works or not

try to use CFrame.fromOrientation(math.rad(90),0,0)

Help with rotating a CFrame right like parts orientation - Help and Feedback / Scripting Support - DevForum | Roblox

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.