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 9 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 — 9y
0
Thanks guy! 1nubcaik 62 — 9y

1 answer

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

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

Ad

Answer this question