Problem with Model.PrimaryPart

Hello, I have a quite small problem that I do not know how to fix;

Player.Character.HumanoidRootPart.Position = + 0, 5, 0)

In this line of code, I try to teleport the player’s character to the cloned car primarypart position, but I do not know how to make it work.

The error is this one:

[21:46:06.179 - ServerScriptService.DealerShipEvent:12: bad argument #2 (Vector3 expected, got number)]

I already tried using Vector3 instead .Position, but it tells that Vector3 is not a valid member of VehicleSeat. Any suggestion?

You can’t add a vector3 by a number, only multiply or divide. You seemed to want to add a Vector3 so do +, 5, 0)

If I put

Player.Character.HumanoidRootPart.Position = + 0, 5, 0)

I get this error;

21:51:55.833 - ServerScriptService.DealerShipEvent:12: attempt to perform arithmetic (add) on userdata and number

You need to add the position…

Player.Character:SetPrimaryPartCFrame( +, 5, 0)) )
1 Like

Adding on to @incapaxx’s solution:
instead of doing this:

Player.Character:SetPrimaryPartCFrame( +, 5, 0)) )

you can shorten it by doing this:


because now it will rotate the player if the car is rotated also, because you don’t want the player to sit sideways.