Area Module
In your wally.toml file, add this to your dependencies:
You have two solutions to import this module, depending if you wish to import the Controller or the Service on your own, or if you let the module give you the right code.
A file called AreaModule.config.lua is to be created in the folder ReplicatedStorage/Shared/Configs.
Explanation:
Each element can either be a CFrame or a Part and will represent a destination for the zones.
Usage
List of events:
OnTableUpdated: triggers whenever the area's table is updated (When areas are unlocked).
Usage
Methods
Client
Explanation
player: The player to fetch the zones from.
Server
Explanation
player: The player to fetch the zones from.
player: The player to check the zone for.
areaToCheck: The area to check.
Server
Explanation
player: The player to fetch the zones from.
...: a table of zones names to be unlocked.
Client
player: The player to fetch the zones from.
destination: The destination to teleport to.