I have a local script that needs to fire an event to another player’s client. Is this possible without needing to go through the server?
I thought BindableEvents only communicated to your own local scripts
Hmm, I had a stroke and didn’t think that through. My bad, man, my bad.
No, there’s no way to communicate between Clients without going through the server as far as I know.
A way to fire an event without the server would be to apply a change to something which doesn’t respect FilteringEnabled. For instance, the playback of sounds (which is the only example I know of):
-- Player1's local script
local eventSound: Sound = workspace.Player2FireEvent
-- firing the event to Player2
eventSound:Play()
-----------------
-- Player2's local script
local eventSound: Sound = workspace.Player2FireEvent
-- detecting when the event is fired
eventSound.Played:Connect(function(soundId)
-- response to the event firing
-- if the properties of the sound also do not respect FilteringEnabled, it may be possible to use them as parameters for the event being fired.
end
If SoundService.RespectFilteringEnabled is false, playing a sound will replicate to all other clients. This means it would be necessary to have a unique sound for each player/event combination, which seems rather impractical.
Overall though, I wouldn’t recommend doing this, since exploiters could easily spam events to other clients. It’s up to you though.
I was dealing with a sound system, so this solved the problem! Thanks!
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.