Buy car script - Don't working

--Config

local seat = script.Parent--The location of the seat, if you put this script inside the seat, you will not need to change it.
local CarName = "Lambo"--Change to Car name



--Do Not Edit Past This

seat.ChildAdded:connect(function(Child)	
	if Child.Name == "SeatWeld" then
			local player = game.Players:GetPlayerFromCharacter(Child.Part1.Parent)
			if (player) then
				if player [CarName][CarName].Value == 2 then

				else
					Child:Destroy()
					player.Character.Humanoid.Jump = true
					Child.Part1.Parent.Humanoid.Jump = true
				player.PlayerGui[CarName].Enabled = true--Shows them the purchase Gui!
				wait()
				player.Character.Humanoid.Jump = true

				end
			end
			end
	end)

Why is it don’t works?

Whats not working? What are you trying to make? Please be more specific!

some of the paths does not work correctly. but I don’t know which ones

Wdym you need to be more specific what are you making what is the script supposed to do

Debug it with print() statements so you can confirm where the issue may lie more thoroughly:

--Config

local seat = script.Parent--The location of the seat, if you put this script inside the seat, you will not need to change it.
local CarName = "Lambo"--Change to Car name


print("Script running")
--Do Not Edit Past This

seat.ChildAdded:connect(function(Child)	
    print("Event fired")
	if Child.Name == "SeatWeld" then
        print("Found a child")
			local player = game.Players:GetPlayerFromCharacter(Child.Part1.Parent)
			if (player) then
                print("Found player")
				if player [CarName][CarName].Value == 2 then
                    print("Ok what's the use of this conditional check-")
				else
					Child:Destroy()
					player.Character.Humanoid.Jump = true
					Child.Part1.Parent.Humanoid.Jump = true
			    	player.PlayerGui[CarName].Enabled = true--Shows them the purchase Gui!
			    	wait()
			    	player.Character.Humanoid.Jump = true
                    print("EA Sports")
		 		end
			end
			end
	end)