local TweenService = game:GetService("TweenService")
local parts = game:GetService("Workspace"):WaitForChild("partStorage")
local tweenInfo = TweenInfo.new(2, Enum.EasingStyle.Linear, Enum.EasingDirection.Out,-1)
parts.ChildAdded:Connect(function(part)
local properties = {CFrame = part.CFrame * CFrame.Angles(math.rad(360),0,0)} -- Here
local tween = TweenService:Create(part,tweenInfo,properties)
tween:Play()
wait(2)
tween:Play()
end)
I want the part to rotate 360 degrees, but it won’t rotate at all. It only works when math.rad(180),0,0), but then it’s rotating 180 degrees. Does anyone know how to fix this?
Nvm, do it in 120º increments as @PapaBreadd said as I wasn’t thinking about direction
parts.ChildAdded:Connect(function(part)
for i = 1,3
local properties = {CFrame = part.CFrame * CFrame.Angles(math.rad(120), 0, 0)
local tween = tweenService:Create(part, tweenInfo, properties)
tween:Play()
tween.Completed:Wait()
end
end)
Pretty sure TweenService uses runservice on the backend in combination with lerping. TweenService is mainly useful when you want to do different easing styles.