Need help with vehicle script [VX Ace]

I am not sure how one would do this, but I found a (commonly used) formula to make a boat able to work on land and not on sea, making way to use a car sprite and effectively making a car. That said, it can also drive on the sidewalk, and that isnt something I am wanting. SO, is it possible to make a tile that a player can travel on but not a vehicle? Or am I stuck with just making the sidewalk untraversable?
If you told us what the "formula" was that you found, we might be able to see if there's an easy way.

Does Yanfly have a region restrictions script for Ace? And can it be conditioned with switches to turn the restrictions on and off?
Does Yanfly have a region restrictions script for Ace
Thanks for the suggestion Shaz.
Require yanfly's move restrict region script and a land vehicle script such as
Land Vehicle by William Couillard.
Spoiler: Yanfly Move Restrict Land Vehicle (boat)
Ruby:
#==============================================================================
#
# ▼ Yanfly Engine Ace - Move Restrict Region v1.03 - Addon
# -- Last Updated: 2012.01.03
# -- Level: Normal
# -- Requires: n/a
# -- Addon Mod: Roninator2
#==============================================================================

$imported = {} if $imported.nil?
$imported["YEA-MoveRestrictRegion"] = true

#==============================================================================
# ▼ Updates
# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# 2012.23.08 - Added Feature: <all restrict: x>
# 2012.01.03 - Added Feature: <all restrict: x>
# 2011.12.26 - Bug Fixed: Player Restricted Regions.
# 2011.12.15 - Started Script and Finished.
#
#==============================================================================
# ▼ Introduction
# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# Not everybody wants NPC's to travel all over the place. With this script, you
# can set NPC's to be unable to move pass tiles marked by a specified Region.
# Simply draw out the area you want to enclose NPC's in on and they'll be
# unable to move past it unless they have Through on. Likewise, there are
# regions that you can prevent the player from moving onto, too!
#
#==============================================================================
# ▼ Instructions
# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# To install this script, open up your script editor and copy/paste this script
# to an open slot below ▼ Materials/素材 but above ▼ Main. Remember to save.
#
# Must be below Yanfly Engine Ace - Move Restrict Region v1.03
#
# -----------------------------------------------------------------------------
# Map Notetags - These notetags go in the map notebox in a map's properties.
# -----------------------------------------------------------------------------
#
# <vehicle restrict: x>
# <vehicle restrict: x, x>
# Players will not be able to move on tiles marked by region x unless the
# player has a "Through" flag on. Draw out the area you want to close the
# player in with the regions and the player will be unable to move past any of
# those tiles marked by region x. If you want to have more regions restrict the
# player, insert multiples of this tag.
#
#==============================================================================
# ▼ Compatibility
# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# This script is made strictly for RPG Maker VX Ace. It is highly unlikely that
# it will run with RPG Maker VX without adjusting.
#
#==============================================================================

module YEA
  module MOVE_RESTRICT
   
   
    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    # - Default Vehicle Restricted Regions -
    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    # If you want there to always be a region ID that will forbid the vehicle
    # from passing through, insert that region ID into the array below.
    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    DEFAULT_VEHICLE = [59]
   
  end # MOVE_RESTRICT
end # YEA

#==============================================================================
# ▼ Editting anything past this point may potentially result in causing
# computer damage, incontinence, explosion of user's head, coma, death, and/or
# halitosis so edit at your own risk.
#==============================================================================

module YEA
  module REGEXP
  module MAP
   
    VEHICLE_RESTRICT =
      /<(?:VEHICLE_RESTRICT|vehicle restrict):[ ]*(\d+(?:\s*,\s*\d+)*)>/i
   
  end # MAP
  end # REGEXP
end # YEA

#==============================================================================
# ■ RPG::Map
#==============================================================================

class RPG::Map
 
  #--------------------------------------------------------------------------
  # public instance variables
  #--------------------------------------------------------------------------
  attr_accessor :vehicle_restrict_regions
 
  #--------------------------------------------------------------------------
  # common cache: load_notetags_mrr
  #--------------------------------------------------------------------------
  alias r2_load_notetags_mrr_tnm5j load_notetags_mrr
  def load_notetags_mrr
    r2_load_notetags_mrr_tnm5j
    @vehicle_restrict_regions = YEA::MOVE_RESTRICT::DEFAULT_VEHICLE.clone
    #---
    self.note.split(/[\r\n]+/).each { |line|
      case line
      #---
      when YEA::REGEXP::MAP::VEHICLE_RESTRICT
        $1.scan(/\d+/).each { |num|
        @vehicle_restrict_regions.push(num.to_i) if num.to_i > 0 }
      #---
      end
    } # self.note.split
    #---
  end
 
end # RPG::Map

#==============================================================================
# ■ Game_Map
#==============================================================================

class Game_Map
 
  #--------------------------------------------------------------------------
  # new method: player_restrict_regions
  #--------------------------------------------------------------------------
  def vehicle_restrict_regions
    return @map.vehicle_restrict_regions
  end

end # Game_Map

#==============================================================================
# ■ Game_CharacterBase
#==============================================================================

class Game_CharacterBase

  #--------------------------------------------------------------------------
  # alias method: passable?
  #--------------------------------------------------------------------------
  alias r2game_characterbase_passable_mrr passable?
  def passable?(x, y, d)
    return false if vehicle_region_forbid?(x, y, d)
    return r2game_characterbase_passable_mrr(x, y, d)
  end
 
  #--------------------------------------------------------------------------
  # new method: player_region_forbid?
  #--------------------------------------------------------------------------
  def vehicle_region_forbid?(x, y, d)
    return false unless self.is_a?(Game_Character)
    return false if debug_through?
    region = 0
    case d
    when 1; region = $game_map.region_id(x-1, y+1)
    when 2; region = $game_map.region_id(x+0, y+1)
    when 3; region = $game_map.region_id(x+1, y+1)
    when 4; region = $game_map.region_id(x-1, y+0)
    when 5; region = $game_map.region_id(x+0, y+0)
    when 6; region = $game_map.region_id(x+1, y+0)
    when 7; region = $game_map.region_id(x-1, y-1)
    when 8; region = $game_map.region_id(x+0, y-1)
    when 9; region = $game_map.region_id(x+1, y-1)
    end
    return true if $game_map.all_restrict_regions.include?(region)
    return false if @through
    return true if @vehicle_type != :walk && $game_map.vehicle_restrict_regions.include?(region)
  end
 
end # Game_CharacterBase

#==============================================================================
#
# ▼ End of File
#
#==============================================================================
Moved to: RGSS3 Script Requests
This is what I used to transfer a "ship" into a car.
https://rpgmaker.net/forums/topics/14470/

Is there a better way that you would have done it? (I am very new to game-making)
Also I am not sure what Yanfly is or how to use it, but it looks like it's used for MV, which is from what I have seen widely known to be inconsistent in many ways from VX Ace.
https://www.rpgmakercentral.com/topic/8787-land-vehicle-105-update-09012015/
https://yanflychannel.wordpress.com/rmvxa/field-scripts/move-restrict-region/
Follow the links in my signature block for instructions on using scripts.
There is also a script for multi vehicles. so you can have a car and a boat.
https://steamcommunity.com/sharedfiles/filedetails/?id=685598569
Yanfly used to write scripts for Ace and has a very large collection. He now writes plugins for MV. They are inconsistent because they are for different engines, in different languages. When you use scripts/plugins, you have to make sure the are for the engine you're using.

Original thread: https://forums.rpgmakerweb.com/threads/need-help-with-vehicle-script-vx-ace.101001/