Im trying to make a blacklist that prevents certain players from being to click on a button, i have though about making it not visible and then having a second layer of a button behind it thats gray which the user cannot click, but the most important thing is to make the button not visible to certain players.
To deactivate the Button, just turn Active and Visible to false. Make a PlayerAdded function on the server and check if the specifiq plr is in the blacklist datastore. If yes, then fire a remote event to the client to turn active and visible on the UIs to false.
-- This is a server script. Place it in game.ServerScriptService
-- fill this table with user ids of players you want to blacklist
local blacklistedIds = {}
-- When a new player joins
game.Players.PlayerAdded:Connect(function()
if table.find(blacklistedIds,player.UserId) then
-- Destroy the button to hide it from view
local playerGui = player.PlayerGui or player.PlayerGui:Wait()
playerGui.ScreenGui.Frame.ScrollingFrame.Frame.aviation:Destroy()
end
end)
-- If this errors, just try using :Wait() on various elements in line 11 until it works