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

How to insert a script inside a part?

Asked by
14dark14 167
4 years ago
part = Instance.new("Part", workspace)

part_script = Instance.new("Script", part)

part_script = "my script"

how can I edit the script that will get inserted in the part?

0
u can use loadstring, u cant edit scripts apparently, idk any method.. greatneil80 2647 — 4y

1 answer

Log in to vote
1
Answered by 4 years ago
Edited 4 years ago

Using Script.Source edits the script, but it is only used in the command bar or plugins. Here is a link: https://developer.roblox.com/en-us/api-reference/property/Script/Source

Ad

Answer this question