Reference where a remoteevent was activated from?

currently my output only shows up as nil, it should show up as just “Part”
image

script.Parent.ClickDetector.MouseHoverEnter:Connect(function(plr)
	plr.PlayerGui.Scripts.Highlight:FireClient(plr, script.Parent)
end)

ServerScript

script.Parent.Highlight.OnClientEvent:Connect(function(plr, thing)
	print(thing)
end)

LocalScript

1 Like

I am assuming you are using remote events, when you fire a remote to a player it does not pass the player as an argument to the receiving script.

script.Parent.Highlight.OnClientEvent:Connect(function(thing)
	print(thing)
end)

that’s strange but it works now, thank you

If the client was firing the event to the server, the server would have the player passed as an argument so you can identify who fired it.

2 Likes