I'm making a jail system and for some reason my datastore just refuses to work when the player leaves, it works every other time though.
Code:
game.Players.PlayerRemoving:Connect(function(plr)
print("a")
print(game:GetService("ReplicatedStorage").ArrestTimes[plr.Name].Value)
ArrestDS:SetAsync(plr.Name .. ":" .. plr.UserId, game:GetService("ReplicatedStorage").ArrestTimes[plr.Name].Value)
print("hi")
print(ArrestDS:GetAsync(plr.Name .. ":" .. plr.UserId))
print("hi")
end)
