So I am trying to make unban button basically you click the button and it sets the offline player datastore's banned value to false but i get this error. "ATTEMPT TO INDEX NIL VALUE" GetSaved[5].Value = false? ServerScript - GameScriptService
local DataStoreService = game:GetService("DataStoreService") local DataStore = DataStoreService:GetDataStore('GameData1') game.ReplicatedStorage.Remotes.UnbanPlayer.OnServerInvoke = function(Player,PlayerName) local UserID = game.Players:GetUserIdFromNameAsync(PlayerName) local GetSaved = DataStore:GetAsync(UserID) GetSaved[5].Value = false end end
Button LocalScript
script.Parent.MouseButton1Click:Connect(function() local PlayerName = script.Parent.Parent.PlayerInput.Text game.ReplicatedStorage.Remotes.UnbanPlayer:InvokeServer(PlayerName) end)