Remote event from server returns Player, rather than character

The code it meant to return the player’s character, but for some reason after being passed down to the server, it returns the player from Players.

--localscript
local character = game.Players.LocalPlayer.Character
local remoteevent = game.ReplicatedStorage.RemoteEvent
print(character)
print(character.Parent)
remoteevent:FireServer(character)
--serverscript
local remoteevent = game.ReplicatedStorage.RemoteEvent

local function sendcharacter(character)	
print(character)
print(character.Parent)
end

remoteevent.OnServerEvent:Connect(sendcharacter)

This is not a bug, what happened is that the default parameter for a remote event on the server is the player, it will work if you change the code to:

local function sendcharacter(player, character)

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.