What we use string Value for and Int Value And what's the difference between the events i can do with them?
StringValue
class has a Value
property which holds a string
. A string is just some text.
lua
local stringVal = Instance.new("StringValue");
stringVal.Name = "randomText";
stringVal.Value = "any text can be here";
stringVal.Parent = game:GetService("Workspace");
IntValue
class has a Value
property aswell, but it holds 32 bit signed integers. Signed means it can represent negatives as well. 32 bits means that is how many bits are used to represent the number. There are 8 bits in a byte. It cannot represent fractions. If you need to represent fractions, use NumberValue
s. NumberValues store 64-bit doubles, so they can represent bigger numbers.
lua
local numberVal = Instance.new("NumberValue");
numberVal.Name = "randomNumVal";
numberVal.Value = 23142254;
numberVal.Parent = game:GetService("Workspace");