So I am trying to move a player to a seat when he steps onto a part, but somehow when he steps onto the part he moves to the seat but like 50% he won’t sit down but just stand on it. Can some one help me? By the way: I already used the :sit()
Code:
script.Parent.Touched:Connect(function(hit, player)
local Hit = hit.Parent
local playerName = hit.Parent.Name
if hit.Parent:FindFirstChild('Humanoid') then
Hit:MoveTo(game.Workspace.Boats:FindFirstChildWhichIsA('MeshPart'):FindFirstChild('MeshPart'):FindFirstChild('Part').Position)
wait()
game.Workspace.Boats:FindFirstChildWhichIsA('MeshPart'):FindFirstChild('MeshPart').Drive:Sit(hit.Parent:FindFirstChild('Humanoid'))
hit.Parent:FindFirstChild('Humanoid').Sit = true
hit.Parent:FindFirstChild('Humanoid').JumpPower = 0
end
end)
If you want them to just Sit on the Seat when the Part is Touched then there isn’t a need to teleport them since the :Sit() function will do that for you. (Unless I’ve misinterpreted what you’re trying to get)
Give this ago and tell me if it works for you!
script.Parent.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") then
local Humanoid = hit.Parent:FindFirstChild("Humanoid")
Humanoid.JumpPower = 0
workspace.Boats:FindFirstChildWhichIsA("MeshPart"):FindFirstChild("MeshPart").Drive:Sit(Humanoid)
end
end)