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

How do I get a modulescript to edit parts from the original script?

How do I get a modulescript to edit parts from the script? Example

local module = require(workspace.module)
local part = script.Parent

module.test(part)

and in the module

function test(part)
-- code to do stuff with part from script like Part.Color = etc etc
end

It just errors to me "Attempt to call a nil value" or something

1 answer

✓ Accepted answer

That's because the function isn't a part of the table. I believe you wanna do

function module.test(part)

end

2 comments

0

Fast and short.

0

Thanks I seem to have just forgotten that Dx

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