#Attempting to remove a weapon from a player backpack when they combat log

1 messages · Page 1 of 1 (latest)

latent pivot
#

can we see the DataStoreModule.find function?

#

also just print what it returns

#

seems like dataStore variable is nil

#
local DataStoreModule = require(game:GetService("ServerStorage").SDM)
local collectionService = game:GetService("CollectionService")


game.Players.PlayerRemoving:Connect(function(player)
    

    local dataStore = DataStoreModule.find("Stats", player.UserId)
    print(dataStore)
    
        if dataStore.Value.Glock17tan == true and collectionService:HasTag(player, "InCombat") then
        dataStore.Value.Glock17tan = false
                print("Combat Logged!")
  end
end)
frank schooner