Scyfren / rbxts-zone-plus

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

@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!`);
	});	
}

About


Languages

Language:Lua 100.0%