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

how to add a script into a part using a script?

i want to add a script into a part that will be in workspace. how would i do it? will it be

local s = Instance.new("Script")
s.Parent = game.Workspace.Part
s.Source [-- what ever i want here]

wil it be like that?

1 comment

0

can someone help me with this i really need to know how to add text in the script that you just inserted using a different script

2 answers

You cannot use a script to edit another script's source. If I'm understanding your question, you want to place a script into a part. To do that, all you need to do is select the part, look in your Basic Objects and double click "Script". (in a screenshot: http://prntscr.com/97n0rd)

3 comments

0

ok ty

0

Your welcome.

0

Please pick his question as the correct one so he gets +1 rep.

You're just setting the parent property. s.Parent = game.Workspace

1 comment

0

yh but how would i add a code into that script?

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