Hello,
I am wondering if it's possible / how do you create a StringValue inside a script and put it into workspace, same with IntValues and folders.
I would like to get something using HTTPService, and put them inside a variable, which will be "call" "police" "ems" "fire" "swat" and those go inside a folder, how do you do this?
Like this: https://gyazo.com/f746c84518f279f6f00174674c57a81c but via a script.
Thanks
To create new objects or instances, you would use Instance.new().
You can make it a variable and then set it's parent. You can also make a folder this way
folder = Instance.new("Folder", workspace) -- workspace is the parent of the folder or where it's gonna be inside, you can change it to a different service or path. folder.Name = "1" -- name it inside the quote! just don't remove the quote marks value = Instance.new("StringValue", folder) -- folder will be the parent of this newly created value or where it's gonna be inside in value.Name = "Call" value.Value = "" -- since it's a string value, it has a value inside that can have a string text value inside value1 = Instance.new("StringValue", folder) -- don't have the variable named the same unless you're not going to access it later value1.Name = "EMS" value.Value = ""
HTTPService wouldn't be required to create values but it is often used in data store scripts that can be used for saving values when a player leaves or joins the game.