✓ Accepted answer
Ok, lets try it!
First Step : We need to know how to use the "Instance.new()" function, so we can start our code. I'm giving you a LInk where you can read a post on the DevHub and learn how and where you can use it correctly!
Link : https://developer.roblox.com/en-us/api-reference/class/Instance
Second Step : We need to know what's exactly a "String Value"! First of all the StringValue can only store one thing! A string (text) and can be like this...
local stringV = Instance.new("StringValue", script.Parent)
stringV.Value = "This is just a string"
wait()
print(stringV.Value)
That's how we use the Instance.new() and the strings! Now how we can use tables...? (The tables make the things easier when you need to storage something!)
Third Step : Enjoy coding! You always have to enjoy what are you doing! Play some music while you script or even you can play a game so you will be relaxed!
Lets get into the code!
local instances = {
["String Value"] = Instance.new('StringValue');
["String Value2"] = Instance.new('StringValue')
}
local ready = false
instances["String Value"].Parent = script.Parent
instances["String Value"].Value = 'The player it doesnt ready'
instances["String Value2"].Parent = script.Parent
instances["String Value2"].Value = 'Ready... Teleporting!'
local function readyFunction()
if not ready then
script.Parent = (instances['String Value'].Value)
wait()
ready = true
elseif ready then
script.Parent = (instances['String Value2'].Value)
end
end
script.Parent.Text = readyFunction()
That's how we can't make the script you wanted! Is also a easy one and is completely functional!
I hope my answer already solve your question. If it does please accept my answer. That will help me a lot!
Keep scripting!
3 comments
If you want to be a "Good Developer" I recommend you to see my answer in a question. In the next comment I'll send the Link.
https://scriptinghelpers.org/questions/91991/what-does-someone-need-to-know-to-be-considered-as-an-intermediate-scripter#85184
You can detect more than 1 string value in the text of a textbutton since it only has one value