I'm trying to rotate a part using TweenService, but I seem to get into an error every time I do. Any help? Here is my code.

local TweeningService = game:GetService("TweenService")
local partChanges = {
Rotation = Vector3.FromAxis(0,0,90)
}
local TweenInformation = TweenInfo.new(
	15, 
	Enum.EasingStyle.Linear, 
	Enum.EasingDirection.In,
	0,
	false,
	0 			
)
local tween = TweeningService:Create(script.Parent,TweenInformation,partChanges)
wait(2)
tween:Play()

4 comments

0

Post the error.

0
  • Vector3.FromAxis expects Enum.Axis input
0

FromAxis requires an Enum argument. So like Vector3.FromAxis(Enum.Axis.Z)

0

Orientation = Vector3.new(x, y, z)