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: Help! How to put GUIs into PlayerGui.

Previous Thread :: Next Thread 
IceKng is not online. IceKng
Joined: 08 Feb 2011
Total Posts: 24
28 Dec 2013 06:50 PM
Here is what we have so far:

function onPlayerEntered(newPlayer)
script.ScreenGui:clone().Parent = script.Parent.Parent.PlayerGui
end
script.Parent.PlayerAdded:connect(onPlayerEntered)

Its not showing up in PlayerGui when tested. Maybe I am doing the most stupidest and idiotic thing in which I cannot realize.

I do know that when a player joins, the Backpack,StarterGear,PlayerGui load later. Wait(10) could fix it.

So maybe adding a repeat could also help?

game.Players.ChildAdded:connect(function(newPlayer)
repeat wait() until newPlayer:FindFirstChild("PlayerGui")
game.Workspace.GUI:clone().Parent=newPlayer.PlayerGui
end)

Might get some replies on saying that I don't need wait(10)
But I need some help with this script. Is there anyway I can get ScreenGui into the PlayerGui.
Report Abuse
IceKng is not online. IceKng
Joined: 08 Feb 2011
Total Posts: 24
28 Dec 2013 06:51 PM
Thanks.
Report Abuse
OfflineFighter is not online. OfflineFighter
Joined: 22 Jul 2013
Total Posts: 63
28 Dec 2013 06:53 PM
a = script.ScreenGui:clone()
a.Parent =player.PlayerGUI
Report Abuse
IceKng is not online. IceKng
Joined: 08 Feb 2011
Total Posts: 24
28 Dec 2013 07:25 PM
It doesn't get sent to the PlayerGui?
Report Abuse
IceKng is not online. IceKng
Joined: 08 Feb 2011
Total Posts: 24
28 Dec 2013 07:28 PM
Like in Robloxity, once you click the GUI its never comes back. How can I getthat to work. It wont appear in the PlayerGui and it is named ScreenGui
Report Abuse
FreeScriptMaker is not online. FreeScriptMaker
Joined: 29 Nov 2013
Total Posts: 2275
28 Dec 2013 07:28 PM
1. Put it in the StarterGui
2.If you only want the gui for specific players use this code:

local players = {} --put all players names in the table
local gui = game.ServerStorage.Gui --change to the gui

function isPlr(plr)
for i,v in pairs(players) do
if v:lower() == plr.Name:lower() then
return true
end
end

game.Players.PlayerAdded:connect(function(plr)
gui:Clone().Parent=plr:WaitForChild("PlayerGui")
end)
Report Abuse
IceKng is not online. IceKng
Joined: 08 Feb 2011
Total Posts: 24
28 Dec 2013 07:32 PM
I want it to dissapear when the player respawns.
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