Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

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

Asked by
IcyEvil 260 Moderation Voter
10 years ago

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)
0
Not possible as far as I know. Perci1 4988 — 10y
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. IcyEvil 260 — 10y

1 answer

Log in to vote
0
Answered by
Emg14 10
10 years ago

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

Ad

Answer this question