Skip to content

Commit

Permalink
Fix import issue
Browse files Browse the repository at this point in the history
  • Loading branch information
AsynchronousAI committed Mar 15, 2024
1 parent 8efd306 commit daf0246
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/rbxpy.py
Original file line number Diff line number Diff line change
Expand Up @@ -1087,7 +1087,7 @@ def visit_IfExp(self, node):

def visit_Import(self, node, og= True):
"""Visit import"""
line = 'local {asname} = rcc.import("{name}") or require("{name}")'
line = 'local {asname} = rcc.import("{name}", script) or require("{name}")'
values = {"asname": "", "name": ""}

if og:
Expand Down Expand Up @@ -2291,7 +2291,7 @@ class = "table"
if useRequire:
DEPEND = """\n\n--> imports
py = _G.rbxpy or require(game.ReplicatedStorage.Packages.pyruntime)
if game.ReplicatedStorage.Packages.rcclib then
if game.ReplicatedStorage:FindFirstChild("Packages") and game.ReplicatedStorage.Packages:FindFirstChild("rcclib") then
rcc = _G.rcc or require(game.ReplicatedStorage.Packages.rcclib)
else
rcc = { }
Expand Down

0 comments on commit daf0246

Please sign in to comment.