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

How do I reference the descendants of a ModuleScript?

Lets say My modulescript references the value of a StringValue object which is a descendant of the Modulescript.

When you try the obvious:

local module = {}
module.a = script.StringVal.Value
return module

a returns nil

So how do I keep a ancestry reference? Or is this not possible?

1 comment

0

Please people I need an answer!

1 answer

Val is not a valid member of StringValue and that's what module.a is nil. Set module.a to script.StringValue.Value instead of Val and it will work as expected.

1 comment

0

Sorry that was a quick typo I made when typing up the example. It still doesn't work

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