Is it possible to render beams on multiple clients without sending information to the server?

Render.DrawBeam is a client function , but I’d like to call the function on multiple clients’ screens simultaneously and preferably without latency. So far the only way I’ve thought of doing this is by using a net.SendToServer() on the client that is rendering the beam, and on a server script, do net.Broadcast() with a net.Receive() on a client script telling all of the clients to render a beam. I would really really like it if I could find a better way to do that, because this way limits the amount of beams I can render in a short time severely, and it also is subject to the effects of a player’s latency. Is there a better way to render a beam (using render.DrawBeam()) on multiple players at once?

Why would you need to net.SendToServer()? Either draw them clientside when an event happens, or if the event is serverside, then net.Broadcast().

The beam that is being drawn is a direct result of something the client does in a completely client-side script, but that beam also needs to be drawn for everyone else connected to the server.

That’s hard, because you can’t make a client-side function like render.DrawBeam() render for the whole server. So, to make it render for the whole server, I used net send to the server to tell the server to net broadcast every other client to render a beam.

Basically what I am asking for is a way to contact client to client, as net.Broadcast() is server side, and the beam is being rendered in a client script.

[editline]8th May 2015[/editline]

Also, I’d like to emphasize that the event that causes the beam to be rendered is happening client-side.

What are you actually trying to do. You cannot send from client to client. If you are trying to make a beam type weapon, all you have to do is draw when the weapon fires.

If you draw when the weapon fires, it only shows up on the client firing it. render.DrawBeam() is client side only, unless I’m misunderstanding.

If you don’t want to use the net library for it some reason, use datatable variables on the weapon.

Okay, that doesn’t help. If there isn’t a way to communicate client to client or something with similar effects, I doubt it’s possible to make it how I want it. Thanks.

What exactly are you trying to do? If you’re just trying to have the beams that fire out of your weapon shown to the other clients I don’t see a problem with networking it or using datatable variables.

I tried that and it did work fine, but there were limits with how many I could create consecutively in a short amount of time, and that is the big issue with it. I am just expecting too much from the performance of the game, and it just occurred to me that client to client communication might solve that, but since it turns out there are no ways to communicate client to client, there’s nothing I can do but lower my expectations.