I see from the comments that you are using a server script to change the GUI.
Due to filtering enabled, client objects will not get replicated to the server, if you want to access the player's gui, you would have to manually clone them to their PlayerGui when they join, then the server made this change and you can change it on the server as well.
I recommend that you, however, instead use a LocalScript on the client and use a RemoteEvent or RemoteFunction, and then fire those events from the server and tell the client to do something.
Check the example below, note that it is not to be used in a production game, it's just an example of how you would do this.
local ReplicatedStorage = game:GetService("ReplicatedStorage");
local GUIToggler = ReplicatedStorage:WaitForChild("GUIToggler");
GUIToggler:FireClient(PlayerHere, "open");
local ReplicatedStorage = game:GetService("ReplicatedStorage");
local GUIToggler = ReplicatedStorage:WaitForChild("GUIToggler");
GUIToggler.OnClientEvent:Connect( function (action)
print("Request received from the server");
if action == "open" then
else
end
end)
4 comments
is this a regular script?
yes
then what do i have to use?
You should try using a RemoteEvent.