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
3 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 3 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 — 3y
Ad
Log in to vote
0
Answered by
LaysCo 61
3 years ago
Edited 3 years ago

to call a module you have to

local InstallRegionModule = require(script.InstalizeRegionScript)

Answer this question