Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

ScreenGui is not a valid member of PlayerGui???

Asked by 6 years ago

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

end

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

2 answers

Log in to vote
1
Answered by
angeI1001 123
6 years ago

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.

0
The only exception to your answer is a for loop running through all the players in a server script DeceptiveCaster 3761 — 6y
0
which, by the way, works DeceptiveCaster 3761 — 6y
Ad
Log in to vote
0
Answered by
iladoga 129
6 years ago

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)

Answer this question