Both arguements provided in an OnServerEvent function are detected as player objects

I’m trying to pass a Vector3 through a RemoteEvent and when the RemoteEvent is fired, the two arguments I passed through it from the client return as player objects, when the second argument is actually a Vector3.
Client:

	local char = game.Players.LocalPlayer.CharacterAdded:Wait()
	local pos = Vector3.new(char:WaitForChild("HumanoidRootPart").Position)
	game.ReplicatedStorage.ResetHatch:FireServer(game.Players.LocalPlayer, pos)

Server:

game.ReplicatedStorage.ResetHatch.OnServerEvent:Connect(function(plar, pos)
				print(pos)
				print(plar)
				plar.PlayerGui.p.RePos.Value = pos
				plar:LoadCharacter()
				plar.Character:MoveTo(plar.PlayerGui.p.RePos.Value) 
			end)

Both of the print statements in the server code return the username of the player that fired the event.

You don’t need to send LocalPlayer as a argument in FireServer()
Change to:

game.ReplicatedStorage.ResetHatch:FireServer(pos)
1 Like

I forgot how to use RemoteEvents for a second :man_facepalming:. Sorry about that, and thank you for reminding me.

1 Like