DriveSeat Player Humanoid

I want the player to sit in the vehicle, but I’m not getting it!

Does anyone know what I do?

local Camionete = Veiculos:WaitForChild("Camionete")

local PlayersVehicles = workspace:WaitForChild("PlayersVehicles")

game.Players.PlayerAdded:Connect(function(Player)
	
	Player.CharacterAdded:Connect(function(Character)
		
		local Humanoid = Character:WaitForChild("Humanoid")
		local HumanoidRootPart = Character:WaitForChild("HumanoidRootPart")
		local HasVehicle = PlayersVehicles:FindFirstChild(Player.Name)
		
		if HasVehicle ~= nil then
			HasVehicle:Destroy()
		end		
		wait()	
		local NewVehicle = Camionete:Clone()
		local VehicleSeat = NewVehicle:WaitForChild("DriveSeat")
		NewVehicle.Parent = PlayersVehicles
		NewVehicle.Name = Player.Name
		NewVehicle:SetPrimaryPartCFrame(HumanoidRootPart.CFrame*CFrame.new(0,1,15))	
		
		wait(1)
		Humanoid:Sit(VehicleSeat) ?
		
	end)
	
end)

Change…
Humanoid:Sit(VehicleSeat) ?

to…
VehicleSeat:Sit(Humanoid)

1 Like