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

how do you make a script, then insert the coding into it via another Script?

Here is what im wanting to Put into a script through another script.

button.Click:connect(function()
	while wait(.7) do 
    for _, v in pairs (game.Players:GetChildren()) do 
        for _, p in pairs (v.Character:GetChildren()) do 
            if p:IsA("Part") and p.Name ~= "HumanoidRootPart" then 
                p.BrickColor = BrickColor.Random() 
for _, x in pairs(v.Character:GetChildren()) do
	

            if x:IsA("Shirt") and x.Name == "Shirt" then
		x:Destroy()
		
		for _, l in pairs(v.Character:GetChildren()) do
			
		if l:IsA("Pants") and l.Name == "Pants" then
			l:Destroy()
	
				end
			end
		end 
      end	
    end		  
end
	 end	end
	end)

2 comments

0

Not possible as far as I know.

0

Perci1, Im wanting to make a plugin that makes peoples Bodies color, And it has to have this script run, but It doesnt insert a script with this in it, So It needs to have a script inserted with this code within it.

1 answer

Well, just make the script with the code in it and disable the script. Then, the script your showing right now, edit it and add this: local newScripttobecloned = locationofthescript.thenewscriptyoujustcreated:clone() newScripttobecloned.Parent = wheretoputthescript newScripttobecloned.Disabled = false

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