Is there a way to detect a remote event being fired by a client from another client? Kind of like what a remotespy script does.
Client firing the event:
game.ReplicatedStorage.Event:FireServer(arguments)
Client 'sniffing' the event:
game.ReplicatedStorage.Event.Fired:Connect(function(arguments)
forgive me if this is a stupid question, new to scripting.
No. Remotes only work from server to client and visa versa. The only way to allow two clients to communicate via remotes is to have the server relay the firing to the correct client. Here's an example of that: Sending client:
RemoteEvent:FireServer(plrToRelayTo, "Hi!")
Server:
RemoteEvent.OnServerEvent:Connect(function(plr, plrToRelayTo, msg) local sender = plr -- Optional logic to check if client is actually allowed to do this RemoteEvent:FireClient(plrToRelayTo, sender, msg) end)
Receiving client:
RemoteEvent.OnClientEvent:Connect(function(sender, msg) print("From: " .. sender .. ": " .. msg) end)
If my answer solved your problem please don't forget to upvote and accept it.