Categories > Coding > Lua >

[REQ] Wrap Global

PoopMaster

SoundInfinity

noticed

Posts: 120

Threads: 23

Joined: Jul, 2019

Reputation: 9

Posted

How is this function supposed to be used? if you know can you please provide an example >.>

  • 0

Proud creator of: WRD+

Posts: 975

Threads: 34

Joined: Dec, 2016

Reputation: 108

Replied

It pushes the specified Roblox global into the wrapped Lua environment's globals. It's useful to use if there is a global that isn't already used in the WRD API. For example, the "UserSettings" global isn't available. You can make it available by using WrapGlobal("UserSettings")

  • 0

PoopMaster

SoundInfinity

noticed

Posts: 120

Threads: 23

Joined: Jul, 2019

Reputation: 9

Replied

@Xero

So if I understand right it would be something like

 

[code]

-- Within the executor

print(workspace) --> nil

WrapGlobal('workspace') --# Makes the global availiable 

print(workspace) --> Workspace 

[/code]

  • 0

Proud creator of: WRD+

Posts: 975

Threads: 34

Joined: Dec, 2016

Reputation: 108

Replied

  • 0

PoopMaster

SoundInfinity

noticed

Posts: 120

Threads: 23

Joined: Jul, 2019

Reputation: 9

Replied

@Xero

That's cool. At first I thought it was something to make global changes/variables, like:

 

[code]

WrapGlobal("function game:debug()  end")

-- Other script:

game:debug()

[/code]

 

Anyways, thanks for the info, it had me confused.

  • 0

Proud creator of: WRD+

Posts: 975

Threads: 34

Joined: Dec, 2016

Reputation: 108

Replied

Happy to help :D

  • 0

Users viewing this thread:

( Members: 0, Guests: 1, Total: 1 )