generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: PlayerGui....Help?

Previous Thread :: Next Thread 
KanataIzumi7 is not online. KanataIzumi7
Joined: 08 May 2011
Total Posts: 949
29 Apr 2014 07:50 PM
script.Parent.MouseButton1Down:connect(function()
for _,v in ipairs(game.Players:GetPlayers()) do wait()
local z = game.ReplicatedStorage.Screen:Clone()
local pd = v:FindFirstChild("PlayerGui")
if pd then
z.Parent = pd
end
end
end)




When I try to insert the item into the PlayerGui of other players, it won't allow it. For some reason no player's PlayerGui other than the button presser's can be accessed....any ideas for how to get around this?
Report Abuse
Goulstem is not online. Goulstem
Joined: 04 Jul 2012
Total Posts: 7177
29 Apr 2014 07:55 PM
script.Parent.MouseButton1Down:connect(function()
for i,v in pairs(game.Players:GetChildren()) do
game.ReplicatedStorage:FindFirstChild("Screen")Clone().Parent = v:FindFirstChild("PlayerGui")
end end)
Report Abuse
Exus100 is not online. Exus100
Joined: 11 Aug 2007
Total Posts: 351
29 Apr 2014 07:58 PM
script.Parent.MouseButton1Down:connect(function()
print(#game.Players:GetPlayers())
for _,v in ipairs(game.Players:GetPlayers()) do
wait()
local z = game.ReplicatedStorage.Screen:Clone()
print(z)
local pd = v:FindFirstChild("PlayerGui")
print(pd)
if pd then
z.Parent = pd
end
end
end)

tell me output
Report Abuse
KanataIzumi7 is not online. KanataIzumi7
Joined: 08 May 2011
Total Posts: 949
29 Apr 2014 08:03 PM
--
Screen
PlayerGui
...
--


That's the reason I used FindFirstChild("PlayerGui") so that it wouldn't error saying;

21:02:47.607 - PlayerGui is not a valid member of Player
Report Abuse
KanataIzumi7 is not online. KanataIzumi7
Joined: 08 May 2011
Total Posts: 949
03 May 2014 10:57 AM
Bump I.
Report Abuse
KanataIzumi7 is not online. KanataIzumi7
Joined: 08 May 2011
Total Posts: 949
04 May 2014 11:51 AM
Bump II.
Report Abuse
KanataIzumi7 is not online. KanataIzumi7
Joined: 08 May 2011
Total Posts: 949
04 May 2014 01:02 PM
Bump III.
Report Abuse
KanataIzumi7 is not online. KanataIzumi7
Joined: 08 May 2011
Total Posts: 949
04 May 2014 01:43 PM
Bump IV.
Report Abuse
FreeScriptMaker is not online. FreeScriptMaker
Joined: 29 Nov 2013
Total Posts: 2275
04 May 2014 01:45 PM
If this is in a LocalScript then that is your problem. A client can only access its own PlayerGui.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image