I'm not sure if I am doing this completely wrong but what I am trying to do is make it so when someone is teleported to a cheater cage a bool value saves and when it is true they are banned and cannot get out of a cage. But for some reason, after I looked up some tutorials they did not work.
local datastore = game:GetService("DataStoreService")
local ds1 = datastore:GetDataStore("BanningSystem")
game.Players.PlayerAdded:Connect(function(plr)
local BanningSystem = Instance.new("BoolValue", plr)
BanningSystem.Name = "IsBanned"
BanningSystem.Value = ds1:GetAsync(plr.UserId) or false
ds1:SetAsync(plr.UserId, BanningSystem.Value)
BanningSystem.Changed:Connect(function()
ds1:SetAsync(plr.UserId, BanningSystem.Value)
end)
end)
