Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

ScreenGui is not a valid member of PlayerGui???

function Clicked(Plr) Plr.PlayerGui.ScreenGui.Frame.Visible=true

end

script.Parent.ClickDetector.MouseClick:connect(Clicked)

2 answers

First of all, it is not a glitch. Server cannot access clientsided content such as items inside a player's playergui, vice versa.

Instead, you can clone the gui and parent it to their playergui.

Hope this helped.

2 comments

0

The only exception to your answer is a for loop running through all the players in a server script

0

which, by the way, works

This glitch has happened to me multiple times. I do believe that Guis in starter gui cannot be touched or changed by Server scripts. So try adding in a clone scrip that clones the gui from server storage to the players gui when they join.

Here is an example. Make sure to put this script in serverscriptservice and put the gui into ServerStorage

game:GetService("Players").PlayerAdded:connect(function(plr)
	game:GetService("ServerStorage").ScreenGui:Clone().Parent = plr.PlayerGui
end)

This discussion is preserved as it was. New answers, comments, and votes are closed.