[HELP] Script isnt working

Hey guys any ideas why not working? (client-side only)

cl_personalstash.lua:

local check = false
RegisterNetEvent('qb-mechanicjob:personalstash', function()
    if onDuty then
        TriggerServerEvent("inventory:server:OpenInventory", "stash", "personalstash_"..QBCore.Functions.GetPlayerData().citizenid)
        TriggerEvent("inventory:client:SetCurrentStash", "personalstash_"..QBCore.Functions.GetPlayerData().citizenid)
    end
end)
local function Controls(variable)
    CreateThread(function()
        check = true
        while check do
            if IsControlJustPressed(0, 38) then
                exports['qb-core']:KeyPressed(38)
                if variable == "personalstash" then
                    TriggerEvent('qb-mechanicjob:personalstash')
                end
            end
            Wait(1)
        end
    end)
end
CreateThread(function()
        local stashPoly = {}
        for k, v in pairs(Config.Locations["personalstash"]) do
            stashPoly[#stashPoly+1] = BoxZone:Create(vector3(vector3(v.x, v.y, v.z)), 1, 1, {
                name="personalstash"..k,
                debugPoly = false,
                heading = -20,
                minZ = v.z - 2,
                maxZ = v.z + 2,
            })
        end  
        local stashCombo = ComboZone:Create(stashPoly, {name = "stashCombo", debugPoly = false})
        stashCombo:onPlayerInOut(function(isPointInside)
            if isPointInside and PlayerJob.name =="mechanic" then
                if onDuty then
                    exports['qb-core']:DrawText("[E] Öffne Personalschrank",'left')
                    Controls("personalstash")
                end
            else
                check = false
                exports['qb-core']:HideText()
            end
        end)
    end)

Config.lua:
["personalstash"] = vector3(153.9, -3011.36, 7.04),

1. why vector3(vector3(v.x, v.y, v.z)) on BoxZone:Create?
2. maybe because you put Config.Locations["personalstash"], try Config.Locations for read that array

is copied from qb-ambulance i have tried to make it with only one vector…, but then i get more errors

Not working, same error

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.