How to fire to a specific server script from a local script

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve?

I want to have a local script fire a variable to a specific, known server script.

  1. What is the issue?

I can’t use :FireServer() without it sending to all server scripts
image
Hopefully demonstrated in the diagram.
I need this to work this way as I don’t want other people getting the :fireserver(), as they should have it come from their own local scripts.
This may not work, and I would need to have another solution/workaround.

  1. What solutions have you tried so far?

I didn’t find anything on the developer forum resembling this issue, so I hope this is novel.

Client side:

repeat wait() until game.Players.LocalPlayer.Character
repeat wait() until game.Players.LocalPlayer.Character:IsDescendantOf(game.Workspace)
game.ReplicatedStorage.Playerfinder:FireServer()

Server side:

game.ReplicatedStorage.Playerfinder.OnServerEvent:Wait()
print("b")

Hopefully all works out, first post FTW!

Just make another remote event.

I don’t think what you’re trying to accomplish is possible given that you’ll have multiple instances of the server script running concurrently.

What is the intended purpose of Playerfinder?

Huh I was under the impression that the remote events needed to be in replicated storage. But apparently not, I can just have them in the tool.

Simply to make the main gun server script wait until the player exists.