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

Is there a way to insert and script, a script with a script?

Asked by 10 years ago

This is part of my script

local part = Instance.new("Part", workspace)
createscript([[script.Parent.Touched:connect(function(part)
local h = part.Parent:FindFirstChild("Humanoid")
if h then
h.Health = 0    
    end
end)]],part)

I don't know if this would work. It's not in the wiki and I can't test in studio because I didn't finish the LOOOONNGGG script. There are blue lines under the "createscript". I know roblox had scripting updates so I don't think this is a feature anymore. Will this actually make a killing part?

2 answers

Log in to vote
0
Answered by 10 years ago

Now I'm not a fully experienced scripter, I have only been scripting (successfully) for about 3 months. But since nobody has given you an answer, I will give it a go, First of all Blue line means that it isn't a script-able word, in which case it looks for it as an abbreviation.

createscript = Instance.new ("Script")

--If this doesn't help or isn't correct, I am so sorry.--

Ad
Log in to vote
0
Answered by 10 years ago

If you hover over the blue line with your mouse it should tell you why it's there.

0
It's because the blue line thinks It's a variable. EzraNehemiah_TF2 3552 — 10y

Answer this question