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

How can i put the number of two int values togheter using a script?

local race = Player:WaitForChild("Values").Race.Value
	local variation = Player:WaitForChild("Values").Variation.Value
	print(race..variation)

so basically i want the number the race value and the number of the variation value to be together in a text box so like if race's value is 3 and variation value is 1 i want it to print "31"

1 answer

✓ Accepted answer

You have two numbers right now, convert them to a string then concatenate (join them) as shown below:

local race = Player:WaitForChild("Values").Race.Value
local variation = Player:WaitForChild("Values").Variation.Value

print(tostring(race)..tostring(variation))

Even so, this is unnecessary because you could just do what you did lmao... Look here:

sh link to lua interpreter

So this entire time you did it right.

Although if you want to add them simple do race+variation

1 comment

0

yeah your right, i realised this wasnt my issue, it was that i was running it too soon for the values to actually load so i just put a wait(5) and it worked

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