You can write your topic however you want, but you need to answer these questions:
-
What do you want to achieve? Keep it simple and clear!
I want the block to rotate 90 degrees. This is for the doors. -
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. -
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)