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

I was trying to use a module script , i got an error but i dont see what i did wrong?

Asked by
hokyboy 270 Moderation Voter
4 years ago

Server Script

--//Varibles\\--
wait(1)
local InstallRegionModule = script.InstalizeRegionScript

InstallRegionModule.Install()

Module script

local WorkspaceRegions = workspace.Regions
local module = {
    Install = function()
    for i,v in pairs(WorkspaceRegions:GetChildren()) do
        v.RegionPart.Transparancy = 1
        v.CanCollide = false
    end
end
}
return module

2 answers

Log in to vote
3
Answered by 4 years ago

You have to call require on ModuleScripts.

local InstallRegionModule = require(script.InitializeRegionScript)
0
Ifeel stupid now i forgot i had to use require hokyboy 270 — 4y
Ad
Log in to vote
0
Answered by
LaysCo 61
4 years ago
Edited 4 years ago

to call a module you have to

local InstallRegionModule = require(script.InstalizeRegionScript)

Answer this question