So this first script is a LOCAL SCRIPT This LOCAL SCRIPT is inside a TEXTBUTTON where only certain people can see.
script.Parent.MouseButton1Click:Connect(function(plr)
game.ReplicatedStorage.DisableBalls:FireServer(game.Players:GetPlayers())
end)
The other script is a SERVER SCRIPT And this is inside SERVER SCRIPT SERVICE This is wrong i know that but I just want to know how do i access everyones playergui inside a server script?
game.ReplicatedStorage.DisableBalls.OnServerEvent:Connect(function(player, localplayer)
for _,v in pairs(localplayer) do
v.PlayerGui:WaitForChild("ScreenGui").Spawn.TextButton.Text = "Disabled"
v.PlayerGui.ScreenGui.Spawn.TextButton.LocalScript.Disabled = true
end
end)
This was just me having a go at it

3 comments
No, ew, why would you do that?
soz im not good at scripting
im just trying to make something where if you click a textbutton it should disable a script for everyone else