Transferring the character from a local script to a server script via remotes transfers the player?

Exactly as the title says, I’m not sure what I’m doing wrong, if anything, but I would love some help on this.

Local script:

local Character = game:GetService("Players").LocalPlayer.Character
local Remote = game:GetService("ReplicatedStorage").Remote

local UserInputService = game:GetService("UserInputService")

UserInputService.InputBegan:Connect(function(Input)
	if Input.KeyCode == Enum.KeyCode.F then
		Remote:FireServer(Character)
		
	end
end)

Server script:

local Remote = game:GetService("ReplicatedStorage").Remote

Remote.OnServerEvent:Connect(function(Character)
	print(Character:GetDescendants())

end)

What the print shows:
{ [1] = StarterGear, [2] = PlayerGui, [3] = Freecam, [4] = FreecamScript, [5] = Backpack }
The print should be showing the character descendants, and not the player descendants, so I’m not sure what I’m doing wrong here, help would be very appreciated!

Side note: Printing on the local prints the character, but printing on the server prints the player for some reason.

1 Like

the first param of .OnServerEvent is the player then the 2nd+ are the inputted args

2 Likes

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