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

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

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.

2 comments

0

I believe you meant ("NumberValue")

0

Thanks guy!

1 answer

✓ Accepted answer

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

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