Incorrect TweenService description

https://developer.roblox.com/en-us/api-reference/class/TweenService

A paragraph in the description states that TweenService only has one function when it has two (Create, GetValue).

TweenService has just one function, TweenService:Create , which takes information about the animation and generates the Tween object which can be used to play the animation. Note that Tween s can animate multiple properties at the same time.

A list is given of all tweenable types, but tis missing EnumItem.

Note that only specific types of properties can be used with TweenService. The types of properties that can be tweened are:

  • number
  • bool
  • CFrame
  • Rect
  • Color3
  • UDim
  • UDim2
  • Vector2
  • Vector2int16
  • Vector3

An example of tweening an EnumItem property:

local t = game:GetService"TweenService"
local p = Instance.new"Part"
p.Shape = 0
p.TopSurface = 0
p.BottomSurface = 0
p.Size = Vector3.new(1,1,1)
p.Position = Vector3.new(0,100,0)
p.Parent = workspace
local i = TweenInfo.new(
	.1,
	0,
	2,
	-1,
	false,
	0
)
local c = {
	Shape = 2
}
t:Create(p,i,c):Play()
2 Likes

Does tweening an EnumItem do anything special, or something different than just setting it? I think that if it doesn’t do anything different, then it wasn’t listed because it’s just redundant information.

Yes, in my example it will go through all 3 PartTypes and it repeats infinitely.

Thanks for this report, I’ve logged it so that the team can get to it!

3 Likes