Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I create gun effects on other clients without firing too much to the server?

Asked by 4 years ago

Currently the player who yields the gun shoots and can see the effects of the gun such as light flash and a laser of the ray cast. I want this to effect show on the other clients too so it's not dull. However the only time the server knows when the gun is shot is when the bullet hits a player player so then the server can handle the damage. The guns can fire fast about 0.1 times a second. So I didn't think it would be ideal to fire that many events back and forth considering I want to have a large player count.

Any insight would be greatly appreciated.

1 answer

Log in to vote
0
Answered by 4 years ago

0.1 times a second means it takes 10 seconds for 1 bullet to fire, but I'm gonna assume you mean 10 bullets a second. Either set Network Ownership of bullet to client who fired it and face security risks, or just fire a remote for each bullet, you have a limit of 50KB/sec so you can send massive amounts of data using remotes. That's really the only safe way. Also from the server only fire a remote to the clients which are near the bullet that was fired.

Ad

Answer this question