I have a sword in my place that plays a sound every time it's activated. Using RemoteEvents I could make the sounds global but that would cause a lot of traffic, wouldn't it? Is there a better way?
If you mean remote event trafic I don't really understand you as in tools both local and server scripts are allowed so it's your choise if you want to play it server or client side.
Server side advantages --> Players can hear the sound, very usefull
Client side advantages --> Only plays for that person (sounds that aren't neccesary to be heard from the player)
You can also have local and server scripts inside your tool so you can have both local and server side sounds.
Also I doubt it would cause that much traffic.
If the Sound
is already in the sword, you DO NOT have to use RemoteEvents for others to be able to hear it. So in a LocalScript
, you can just do, Tool.Handle.Sound:Play()
, and the sound will play for everybody. (this happens because both client and server can locate the sound instance)
However, you have to use RemoteEvents when you create the sound in a LocalScript
if you use Instance.new()
. (this happens because only the client can locate the sound instance but the server can't, so you have to communicate with the server to let it know that the client is creating the sound instance by using remotevents)