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

Make players able to hear sounds in a gear without remoteevents? (FE)

Asked by
NiKxzsu 13
6 years ago

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?

2 answers

Log in to vote
1
Answered by 6 years ago

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.

Ad
Log in to vote
0
Answered by 6 years ago
Edited 6 years ago

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)

0
Wrong, you won't need to use RE because of tools having both server and client scripts allowed User#20388 0 — 6y

Answer this question