I'm trying to do container robbery script but when i click e it not disable Movement

Client:

ESX = exports['es_extended']:getSharedObject()
local isSearching = false

function Draw3DText(coords, text)
    SetTextScale(0.35, 0.35)
    SetTextFont(4)
    SetTextProportional(1)
    SetTextColour(255, 255, 255, 215)
    SetTextDropShadow()
    SetTextOutline()
    SetTextEntry("STRING")
    SetTextCentre(true)
    AddTextComponentString(text)
    SetDrawOrigin(coords, 0)
    DrawText(0.0, 0.0)
    local factor = (string.len(text)) / 470
    DrawRect(0.0, 0.0+0.0125, 0.017+ factor, 0.03, 0, 0, 0, 75)
    ClearDrawOrigin()
end

Citizen.CreateThread(function()
    while true do
        Citizen.Wait(1)
        local PlayerID = PlayerId()
        if isSearching then
            DisableControlAction(0, 32, true) -- move (w)
            DisableControlAction(0, 34, true) -- move (a)
            DisableControlAction(0, 33, true) -- move (s)
            DisableControlAction(0, 35, true) -- move (d) 
        end
        for i = 1, #Config.RobberyPlaces, 1 do
            Data = Config.RobberyPlaces[i]
            DrawMarker(
                Data.marker,
                Data.pos.x,
                Data.pos.y,
                Data.pos.z-0.75,
                0.0,
                0.0,
                0.0,
                0.0,
                0.0,
                0.0,
                Data.scale,
                Data.scale,
                Data.scale,
                Data.rgba[1],
                Data.rgba[2],
                Data.rgba[3],
                Data.rgba[4],
                false,
                true,
                2,
                nil,
                nil,
                false
            )
            local playerCoord = GetEntityCoords(PlayerPedId(), false)
            local locVector = Data.pos
            if Vdist2(playerCoord, locVector) < Data.scale * 1.12 and GetVehiclePedIsIn(PlayerPedId(), false) == 0 then
                Draw3DText(Data.pos, "~b~[E] ".."~w~"..Config.abovetext)
                if IsControlJustReleased(PlayerID, 46) then
                    isSearching = true
                end
            end
        end
    end
end)

Why don’t you just use FreezeEntityPosition?