import{_ as s,o as a,c as e,Q as n}from"./chunks/framework.419948d5.js";const F=JSON.parse('{"title":"Getting Started","description":"","frontmatter":{},"headers":[],"relativePath":"guide/getting-started.md","filePath":"guide/getting-started.md"}'),l={name:"guide/getting-started.md"},o=n(`

Getting Started

First, you have to require the module

lua
local FastNet2 = require('path.to.module');
local FastNet2 = require('path.to.module');

Then, to create a new event you have to use .new function

lua
local Remote = FastNet2.new("EventName");
local Remote = FastNet2.new("EventName");

Firing event everytime player join

lua
local Players = game:GetService("Players")

Players.PlayerAdded:Connect(function(player)
    Remote:Fire(player, "Welcome!")
end)
local Players = game:GetService("Players")

Players.PlayerAdded:Connect(function(player)
    Remote:Fire(player, "Welcome!")
end)

FastNet2 have built-in feature called pre-process that could wait until the player event is being connected, so you dont have worry about that!

`,8),p=[o];function t(c,r,y,i,E,d){return a(),e("div",null,p)}const g=s(l,[["render",t]]);export{F as __pageData,g as default};