I want to be able to put string on a separate line of code. Here is how one would do in manually
local z = [[
line1
line2
etc
]]
But I want to be able to do this automatically. Now introducing one line of code that isnt all that important!
local finished = ""
for _, detail in pairs(details.Services) do
if detail.Use then
code = tostring(code)..tostring(detail.Code)
end
end
What does this code do?
Simple, it screams it loops through a table then takes a code value inside said table and puts it into the finished value.
Ps what the table looks like:
local details = {
Services = {
TeamService = {
Use = true,
Code = "local teamService = game:GetService('TeamService')"
},
ServerStorage = {
Use = true,
Code = "local teamService = game:GetService('ServerStorage')"
},
}
}
Anyhow upon doing this code and changing the text of a taxtlabel to this can see wellll this:
local teamService = game:GetService(āServerStorageā)local teamService = game:GetService(āTeamServiceā)
all on one single line. But what if I want it to look like this:
local teamService = game:GetService(āServerStorageā)
local teamService = game:GetService(āTeamServiceā)
Much more clean lets be honest. So how can I do this? cause I must learn!