So, i was working on obbies beaten amount, but when player finished the obby, value doesn't increase
dataStore = game:GetService("DataStoreService") SoHStore = dataStore:GetDataStore("SoHStore") db = false script.Parent.Touched:Connect(function(hit) if hit.Parent:FindFirstChild("Humanoid") then if db == false then db = true local player = game.Players:GetPlayerFromCharacter(hit.Parent) local co = SoHStore:GetAsync(player.userId) if co == false then SoHStore:SetAsync(player.userId,true) player.leaderstats.Steeples.Value = player.leaderstats.Steeples.Value + 1 end player:LoadCharacter() wait(6) db = false end end end)
What is wrong with the script?