rbxts-flamework / core

Flamework is an extensible game framework. It requires typescript and offers many useful features.
MIT License
112 stars 8 forks source link

Network remoteEvent issue #111

Closed lttzy closed 3 months ago

lttzy commented 3 months ago

shared/networt.ts import { Networking } from "@flamework/networking";

interface ClientToServerEvents { event(param1: string): void; } interface ServerToClientEvents { event(param1: string): void; } // Returns an object containing aserverandclientfield. export const GlobalEvents = Networking.createEvent<ClientToServerEvents, ServerToClientEvents>();

server/services/example.ts import { GlobalEvents } from "shared/network"; GlobalEvents.event.fire() when I call GlobalEvents to fire, throw an error Property 'event' does not exist on type 'GlobalEvent<ClientToServerEvents, ServerToClientEvents>'

Fireboltofdeath commented 3 months ago

Please refer to the documentation.

There is also the Flamework template which already has networking setup.