Working with remotes in a game, why does this script print the LocalPlayer's name?
-- Local Script
if t.Parent:FindFirstChild("Humanoid") then
local cTarget = t.Parent
game:GetService("UserInputService").InputBegan:connect(function(inputObject, gameProcessedEvent)
if inputObject.KeyCode == Enum.KeyCode.Q then
script["RemoteEvent"]:FireServer(cTarget) -- Sends cTarget to the ServerScript
print(cTarget) -- Part works and prints the correct value
end
-- Server Script
script.Parent.Parent["RemoteEvent"].OnServerEvent:connect(function(cTarget)
print(cTarget) -- Prints LocalPlayer's name for some reason
end)

4 comments
What SHOULD it be printing?
Don't forget to hit that accept answer button if my solution helps.
You're sending the LocalPlayer's character through FireServer which the OnServerEvent will then have two parameters given (Assumed by reading this). The first is the player communicating and second would be the character model you sent.
Ghosted yeet