Getting Local/Other Player from Remote Event?

Hello, this is probably a very basic question but couldn’t figure it out, what I’m trying to accomplish is having the local player click another player, then from the remote event send the other player a GUI. The problem is, when the local player clicks the other player it fires the remote event and in the server-side indexes only the local player in the output. I’m not sure what I’m doing wrong, so for now I only want help to get the other player.
The script for clicking the other players is located in StarterPlayer → StarterPlayerScripts in a LocalScript

local Player = game.Players.LocalPlayer
local Mouse = Player:GetMouse()
local Event = game.ReplicatedStorage.RequestEvent

Mouse.Button1Down:Connect(function()
	if Mouse.Target.Parent:FindFirstChild("Humanoid") then
		local Player2 = game.Players:GetPlayerFromCharacter(Mouse.Target.Parent)
		Event:FireServer(Player,Player2)
		print(Player)
		print(Player2)
	end	
end)

the output for this is correct, indexing player1 and 2 correctly
In ServerScriptService in a Script

local Event = game.ReplicatedStorage.RequestEvent

Event.OnServerEvent:Connect(function(Player,Player2)
-- For now just how to get both players correctly
    print(Player)
    print(Player2)
end)

For some reason unknown to me the output is only the local player, e.x: Notrealac0unt/Notrealac0unt, I’m not sure as for the reason to this so any help is appreciated! Thanks in advanced
~Notrealac0unt

2 Likes

Your mistake is here:

The player who fired the event is automatically included, so you only need to pass the other player in.

Event:FireServer(Player2)
8 Likes

Thank you for the quick response, that was the issue.

2 Likes