I’ve recently noticed some strange CFrame behaviors when I call seat:Sit(): basically, it is setting the position of the player’s humanoidRootPart to the correct position, but the rest of the character is several studs below the seat.
The strange thing, however, is that called seat:Sit() works correctly the first time I call it, but all the time after, it causes the effect I described above.
Here is a video showcasing the issue:
And here is the code that I am using:
First time calling Seat:Sit(), in a data loading script:
local character = player.Character or player.CharacterAdded:Wait()
shipClone:WaitForChild("Seat"):Sit(character:WaitForChild("Humanoid"))
Second time calling seat:Sit(), in a proximity prompt handler script:
local seat = ship:FindFirstChild("Seat")
seat:Sit(player.Character.Humanoid)
As you can see, there is literally no difference, but clearly, something is happening, and if anyone has any ideas as to what that ‘something’ is, please let me know!
The thing is, I don’t think it has anything to do with how I sit the player, because the HumanoidRootPart is in the right place, it’s just that the rest of the player’s character is moved down
It had nothing to do with how I am sitting the player, but rather how I remove the player from the seat. For some reason, using Position on HumanoidRootPart doesn’t move the rest of the character, you have to use CFrame. So I just changed the line to HumanoidRootPart.CFrame += Vector3.new(0,15,0) and now it works perfectly!