Hi, my name is shieldmr3. I’m a scripter and a game developer, I’m the current scripter of an upcoming game called “Geisha” which is a scary game.
I was trying to change the orientation of a part using Tweening, and I’ve used a lot of methods, but none of them worked. Except one, which I used rotation in, and it worked, but when the part moved, the part kept on glitching (rotating on the y and x-axis without on its own). I also tried orientation, which didn’t work (it didn’t give any errors), and tried CFrame too, but it didn’t work, and without errors too. Here’s the script I used:
local OpenValue = script.Parent.Parent.Parent:WaitForChild("Open")
local TweenService = game:GetService("TweenService")
local TweenInformation = TweenInfo.new(
2,
Enum.EasingStyle.Sine,
Enum.EasingDirection.Out,
0,
false,
0
)
local TweenPartProps = {
Position = Vector3.new(-313.643, 4.536, 373.077);
CFrame = script.Parent.Parent.CFrame * CFrame.Angles(0, 90, 0);
}
local Tween = TweenService:Create(script.Parent.Parent, TweenInformation, {CFrame = script.Parent.Parent.CFrame * CFrame.Angles(0,math.rad(120),0)})
script.Parent.Triggered:Connect(function()
if OpenValue.Value then
Tween:Play()
end
end)
I would really appreciate it if you can help me!
Thanks,
ShieldDevs