JSPM

@rbxts/zone-plus

3.2.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 448
  • Score
    100M100P100Q101008F
  • License ISC

Typings for ForeverHD's ZonePlus v3 module

Package Exports

  • @rbxts/zone-plus
  • @rbxts/zone-plus/src/init.lua

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@rbxts/zone-plus) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

@rbxts/zone-plus

Typings for ForeverHD's ZonePlus v3 module

Installation

npm i @rbxts/zone-plus

Example Usage

import { Zone } from "@rbxts/zone-plus";
import { CollectionService } from "@rbxts/services";

for (const zonePart of CollectionService.GetTagged("Zone")) {
    if (!zonePart.IsA("BasePart")) {
        continue;
    }

    const zone = new Zone(zonePart);

    zone.playerEntered.Connect((player) => {
        print(`${player.Name} entered the zone!`);
    });

    zone.playerExited.Connect((player) => {
        print(`${player.Name} exited the zone!`);
    });	
}