Alright, so I am trying to make a police database to check warrants and such on a car. I started with code getting everything set up but I got stuck on figuring out how to get a plate number to a new person that wasn't registered already. How would you check the datastore to make sure that a certain math is not their? Heres the code I got so far, please and thanks :)
local datastore = game:GetService("DataStoreService"):GetDataStore("LisencePlatesStorage") local LisencePlate = "lisencePLATE" game.Players.PlayerAdded:Connect(function(plr) local ID = LisencePlate.."-"..plr.UserId local savedData = nil local PlateNumber = Instance.new("StringValue") PlateNumber.Name = "PlateNumber" PlateNumber.Parent = plr pcall(function() savedData = datastore:GetAsync(ID) end) if savedData ~= nil then PlateNumber.Value = savedData else --math.random(removed because not decided on yet) --area where stuck on end end)