So I've Made a local script which every time a player joins it checks to see if the player is in the list/table if that person is then the GUI/TextButton Shows up. heres the script
local players = game:GetService("Players")
function addPlayer(player)
local isVip = {["WillBe_Stoped"] = true, [""] = true, [""] = true,[""]= true,[""]= true,[""]= true}
if isVip[game.Players.LocalPlayer.Name] then
script.Parent.Visible = true
end
end
for _,player in pairs(players:GetPlayers())do
addPlayer(player)
end
players.PlayerAdded:connect(addPlayer) -- local script (This one works)
-- I added this script to show what im doing
Now for my other scripts. This one is inside the TextButton so when you click it, it should fire an event.
script.Parent.MouseButton1Click:Connect(function()
game.ReplicatedStorage.DisableBalls:FireServer()
end) -- also a local script
now for my final script
game.ReplicatedStorage.DisableBalls.OnServerEvent:Connect(function()
-- inside here i have no idea what to put.(Im tryning to make it so that when the Admin/VIP person Clicks the TextButton It Should Disable another GUI for everyone else)
end)
i may suck at explaining but you can ask me questions in comments xd

1 comment
Yo i tried doing it in game but it did not work i dont really understand since I don't have any idea where to put the "OnServerEvent"