Skip to main content
New Participant
April 25, 2025
Solved

Send network event to server

Hi,

Wondering, is there a way to send a network event from player to server without using broadcast?
I tried sendNetworkEvent(this.world.getServerPlayer()...) but it doesn't accept the server player.

 

Thanks,

John

SeeingBlue
Honored Contributor
April 25, 2025

A network event is the only way to communicate from a local script owned by the player to a default script owned by the server, but you wouldn't send the event to the serverplayer, you would send it to the entity running the default script. So your local script needs some reference to the entity it wants to send the event.

Upcoming Events : Performance Pro - UI Unleashed - Building Responsive & Performant Interfaces Thursday June 19th 5:00 PM PT - Register June Programming Calendar

2 replies

SeeingBlue
Honored Contributor
April 25, 2025

A network event is the only way to communicate from a local script owned by the player to a default script owned by the server, but you wouldn't send the event to the serverplayer, you would send it to the entity running the default script. So your local script needs some reference to the entity it wants to send the event.

Upcoming Events : Performance Pro - UI Unleashed - Building Responsive & Performant Interfaces Thursday June 19th 5:00 PM PT - Register June Programming Calendar
InaCentaur
Inspiring
April 28, 2025

a flowchart or diagram of some sort that distinguishes among all these would help!