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

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

Asked by 8 years ago

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?

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 thegamingpro566 0 — 8y

2 answers

Log in to vote
4
Answered by
BlastNet 250 Moderation Voter
8 years ago

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)

0
ok ty thegamingpro566 0 — 8y
0
Your welcome. BlastNet 250 — 8y
0
Please pick his question as the correct one so he gets +1 rep. CoolMalopus 50 — 8y
Ad
Log in to vote
0
Answered by 8 years ago

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

0
yh but how would i add a code into that script? thegamingpro566 0 — 8y

Answer this question