TweenService:Create Error on IntValue Tweening

Up until two hours ago, you could use TweenService to Tween an IntValue. Now, when calling

local int_val = Instance.new("IntValue")
TweenService:Create(int_val ,info,properties)

an error is returned stating:

TweenService:Create property named "Value" on object "Value" is not a data type that can be tweened

Tweening a NumberValue continues to work fine, however for my purpose, I require the tweening on an IntValue.

Not sure when this became an issue, however I have been tweening IntValues for as long as I can remember up until two hours ago.

Here’s a repro place file:

IntValue Tween Repro.rbxl (17.7 KB)

Press play, and you will see the error. Delete the IntValue and replace it with a NumberValue, and it works fine.

2 Likes

In this release we updated IntValue to support 64 bit integers, but we missed a bug where tween service does not support tweening 64 bit values, we will fix this promptly.

As a short term workaround, you can try changing the IntValue to a NumberValue. Depending on your application you may be able to use this directly. If you really need integers specifically, you can create a temporary IntValue to convert:

local iv = Instance.new(“IntValue”)
iv.Value = numberValue.Value – ivValue now has the correct value

though if you are passing the value to a roblox api that expects an integer, it should get converted automatically.

1 Like

Thanks. Yes, NumberValues will work temporarily with some rounding, I just worry about possible imprecision in the long term.

NumberValue uses 64 bit storage internally, and can precisely represent integer values up to 2^53

x = math.pow(2, 52)
y = x + 1
z = x - 1
print (x == y) – false
print(x == z) – false
x = math.pow(2, 53)
y = x + 1
z = x - 1
print(x == y) – true
print (x == z) – false

Before the update IntValue only stored up to +/- 2^31 so you shouldn’t see any loss of precision with the temporary fix.

3 Likes

We just released the fix, tween service will now work again with IntValue Objects.

3 Likes

All Hail.

1 Like

@LordRugdumph It appears than when attempting to use TweenService on IntValue objects on a mobile client, the same error occurs. I am able to reproduce this when playing online with my Samsung Galaxy S7

The bug is fixed with revision 346 of the game client. On desktop all users are on this version, but for other platforms there are sometimes delays before users get the update.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.