Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

What are IntValues?

What are IntValues and how would I use them?

2 answers

✓ Accepted answer

IntValues, short for Integer Values, are instances which store integers.

Basically, they're a "thing" which only purpose is to store a number. That number cannot be a fraction or decimal, it must be an integer, or whole number. So you could set it to 1 or 2, but not 1.5.

Since all they do is store a number, you have to get creative. One advantage is that they're an actual instance, so you can pass data between scripts.

1 comment

0

They also are implemented as 2 byte integers! So they have a relatively small minimum and maximum value (around +-32,000)

They are Roblox instances with a Value property that can hold an integer. You can use them by creating one (via script or insert object) and change the value (via script or properties toolbar).

To create and edit one with a script:

local intValue = Instance.new("IntValue");
intValue.Value = 10; -- Set the value property to 10
intValue.Parent = workspace; -- Put it in Workspace

4 comments

0

#Teamwork :D

0

I don't know how you managed to ninja me by 3 minutes xD

0

When I pressed the post button your post was already here... The heck?

0

O_o It says I posted 12 minutes ago and you posted 8 minutes ago. But a bit ago it said you posted 4 minutes ago when I posted 1 minute ago.

This discussion is preserved as it was. New answers, comments, and votes are closed.