I'm using a FireClient remote event to make a GUI pop up for the player being clicked on by another player.
Server Script:
script.Parent.MouseClick:Connect(function(player)
local playerClickedOn = script.Parent.Parent.Parent
local guiEvent = game:GetService("ReplicatedStorage"):WaitForChild("GUI").guievent
guiEvent:FireClient(player,playerClickedOn)
end)
Then, after the player is clicked on by another player, a GUI should pop up for the player who was clicked on.
Local Script:
local guiEvent = game:GetService("ReplicatedStorage"):WaitForChild("GUI").guievent
guiEvent.OnClientEvent:Connect(function(player,playerClickedOn)
Player.PlayerGui.YesNo.Enabled = true
Player.PlayerGui.YesNo.PickUp.Visible = true
Player.PlayerGui.YesNo.PickUp.TextLabel.Text = player.Name.." has clicked on you"
end)
However, I get this error:
FireClient: player argument must be a Player object, Line 4
What does this mean and how do I fix this? What I want is for the event where the player that was clicked on has a GUI pop up telling them who clicked on them.

3 comments
Thank you! The function fires now, but I'm getting a new error. "Attempt to index local "theClicker" (a nil value)
I fixed it, thank you!
No problem!