game.Players.PlayerAdded:connect(function(plr)
Screen = game.ServerStorage.ScreenGui:Clone()
Screen.Parent = plr.PlayerGui
plr.PlayerGui.ScreenGui.Frame.TextButton.MouseButton1Click:connect(function()
a = plr.PlayerGui.ScreenGui.Frame.TextBox.Text
for i, v in pairs(game.Workspace:GetChildren()) do
print(a)
if v.Name == a then
print("Q")
v.Transparency = 1
end
end
end)
end)
It's a gui that you write in, let's say you write "Part" and press the go button, all the parts should go invisible. It works but only in studio and not the real game. Help?

6 comments
Probably because you have Filtering Enabled on. With FE the server can't access the client. Also if this is a local script. Then you shouldn't use PlayerAdded as that will detect all players that join.
FE is enabled and it is a server script.
Manipulating GUI objects from the server is seen as bad practice. Use a LocalScript for that.
A less important issue (that still needs to be addressed); ":connect()" is deprecated, use ":Connect()" instead.
How would I get the GUI inside their PlayerGui without it interfering witth other GUIs then=?
change PlayerGui to CoreGui but im not sure that will work because u might need more access to the server side but not sure