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

Could I have some help for a script that copies off a random number to a TextLabel?

I am trying to make a math game for my sister but I am unable to because of this road block.

I already have tried but it is not working.

I am still new to scripting so I would like some help.

wait(5)
local RandomNumber = math.random(1,20) 
plr.PlayerGui.ScreenGui.Frame.TextLabel.Text = "11 +"RandomNumber" ="

1 answer

Use the concatenation operator (this is what it looks like ..) to merge strings. Note: some values can be concatenated without using the tostring function, like numbers.

Sample of concatenating two strings.

local a = 'wow'
local b = 'potato'
print(a .. b) -- "wowpotato"

1 comment

0

+1 because even more effort

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