Hello, I want to make a part what rotates to something like this .
But It’s taking the Long way and Rotating it like this.
I don’t want to use CFrame because it should have a Quart tween on Out.
If theres any way to fix this with Vector please Comment it because I have no Idea why It’s doing the long way.
Have you tried using -/+ on the rotation?
like:
local part = --frame
for i = -180, 0, -1 do
frame.Orientation= i
wait()
end
It’s a tween
local tweenService = game:GetService("TweenService")
local Prop = {
Orientation = Vector3.new(0, 90, 0)
}
local TweenInfoo = TweenInfo.new(0.5,Enum.EasingStyle.Quad,Enum.EasingDirection.Out)
local tween = tweenService:Create(Cam,TweenInfoo,Prop)
tween:Play()
No. But I want It to be a tween because of the animating.
try changing it to Orientation = Vector3.new(0, -90, 0)
Now It just looks at the back that didn’t help.
Its a lot better if you use CFrame.angles
But I want to have it a Quart animation or back.
you can still have quart animation or back.
Ok I’m gonna try changing it to CFrame I tell you if it works.
You could code the tweening by yourself, but still get the easing style of tweens using TweenService:GetValue()
, it will return you a value between 0 and 1, and you can use that to tween it by yourself
It Teleports the Part out of map but when I do
Orientation = CFrame.Angles()
then It throws me an error
TweenService = game:GetService("TweenService")
spininfo = TweenInfo.new(2,Enum.EasingStyle.Linear)
Spin1 = TweenService:Create(script.Parent,spininfo,{CFrame = script.Parent.CFrame * CFrame.Angles(0,math.rad(120),0)})
Spin2 = TweenService:Create(script.Parent,spininfo,{CFrame = script.Parent.CFrame * CFrame.Angles(0,math.rad(240),0)})
Spin3 = TweenService:Create(script.Parent,spininfo,{CFrame = script.Parent.CFrame * CFrame.Angles(0,math.rad(360),0)})
Spin1:Play()
Spin1.Completed:Connect(function()
Spin2:Play()
end)
Spin2.Completed:Connect(function()
Spin3:Play()
end)
Spin3.Completed:Connect(function()
Spin1:Play()
end)
Isn’t there like
Short = true
or something
I have done experiment on orientation it also works.
local part = script.Parent
local rotation = 90 -- you can just change this./
local TweenService = game:GetService("TweenService")
local InfoA = TweenInfo.new(2, Enum.EasingStyle.Linear, Enum.EasingDirection.Out, 0, false, 0)
local GoalA = {
Orientation = part.Orientation + Vector3.new(0, rotation, 0)
}
local TweenA = TweenService:Create(part, InfoA, GoalA)
TweenA:Play()
I don’t think you can do that, you should probably tween the CFrame by yourself using TweenService:GetValue()
if you want to get the result you requested, it will be a little complicated but it will keep the EasingStyle
you used and use the long path.
CFrame = placeholder.CFrame * CFrame.fromAxisAngle(Vector3.new(0,0,0),math.rad(RandomAngle))
Try something like this, depending on the axis your rotating on, you will have to set the vector3 position for it respectively.
Yep Works! I just had to do some stuff to detect with side in needs to go.