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

Can someone help me with "Instance.new" problems?

Asked by 10 years ago

This is the basic gist of my script

local speed = Instance.new("NumberValue", script.Parent.Parent.Cannon.Cannon.Mouth)
speed.Value = 1





function OnTouch(hit)

speed:clone()


end
script.Parent.Touched:connect(OnTouch)


The output error is: "speed is not a valid member of Part"

Can someone help? I'm confused.

0
I believe you meant ("NumberValue") wjs3456 90 — 10y
0
Thanks guy! 1nubcaik 62 — 10y

1 answer

Log in to vote
0
Answered by
u_g 90
10 years ago

Maybe try using "local speed = Instance.new('NumberValue') [Next Line]: "speed.Parent = script.Parent.Parent.Cannon.Cannon.Mouth".

Ad

Answer this question