It’s to don’t make very scripts and very RemoteEvents in the game
And I already make it works
I put a Server Script to change the value and a Local Script to change the Frames Visibility, but I don’t understand why I can’t disable the Visibility in a Server Script.
local players = game:GetService("Players")
function Visible(player)
for i, v in pairs(players:GetPlayers()) do
local gui = v.PlayerGui. --GUI HERE
gui.Visible= false --or true
end
end
script.Parent.MouseButton1Click:Connect(Visible)
Try this on server, will loop through all players to change the visiblility
yes I think you cannot change UI’s in the server since UI is something that’s local. I think that you want to make a UI pop up for everyone. If you want to do that you can make a remoteEvent and fire all clients.
server script:
local remote = game.ReplicatedStorage.RemoteEvent
remote:FireAllClients()
local script:
local remote = game.ReplicatedStorage.RemoteEvent
remote.OnClientEvent:Connect(function()
local UI = game.StarterGui.ScreenGUI.Frame
UI.Visible = true
end)
oops sorry, didn’t realize you already did that . My bad mate!! good luck finding a solution
I know this is already solved, but just to check, is it possible that a local script somewhere else had already set the visibility of these frames.
If so then I believe that local change will override any server side setting of their visiblity, which might be why trying to change it here doesn’t work