How do I make a script that puts scripts into a pacific parts

so I wanted to make a script that puts a script into a pacific parts

I having issue to find a script for it but sadly I cant find anything

I tried doing this, but it just puts it in every parts in the workspace How do I insert a script into every part in the workspace with Studio Command Bar?

is there a way to adding a script into a pacific parts in workspace?

Just do

Local scriptName = ScriptNameHere:Clone()
Scriptname.Parent = PartHere
2 Likes

What I would do Is add all these specific parts in the folder which will be located in workspace, and then.

for i,v in pairs (game.Workspace.FolderName:GetChildren:()) do
local Script = game.Serverstorage.SCRIPTNAME:Clone()
Script.Parent = v
end
1 Like

it doesn’t work it said "Serverstorage is not a valid member of DataModel “Baseplate”

is there something i miss?

so i figured it out, so i put the Main Script into Workspace
i make a folder in the workspace
and i make the script into ServerStorage

> local Script = game:GetService("ServerStorage").InsertScriptName -- change the name
for _, part in pairs (game.Workspace.InsertFolerName:GetChildren()) do if part:IsA("BasePart") 
	then Script:Clone().Parent = part
	end
end
1 Like

thank you the two people who tried to help

I typed Serverstorage instead of ServerStorage, that was causing the error.