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
 

When a person enters, it adds a GUI to their PlayerGui?

Previous Thread :: Next Thread 
commonsensical is not online. commonsensical
Joined: 11 Jan 2012
Total Posts: 258
01 Apr 2012 04:57 PM
How do I do that? Right now my script wont work.

function onPlayerRespawned(newPlayer)
a = game.Lighting.Intro:Clone()
a.Parent = newPlayer
end

function onPlayerEntered(newPlayer)
newPlayer.Changed:connect(function (property)
if (property == "Character") then
onPlayerRespawned(newPlayer)
end
end)
end

game.Players.PlayerAdded:connect(onPlayerEntered)
Report Abuse
kingkiller1000 is not online. kingkiller1000
Joined: 12 Dec 2008
Total Posts: 26415
01 Apr 2012 04:58 PM
Put it in StarterGui.
Report Abuse
JulienDethurens is not online. JulienDethurens
Joined: 11 Jun 2009
Total Posts: 11046
01 Apr 2012 04:59 PM
If you want it to get in their PlayerGui everytime they spawn, put it in the StarterGui.

If you only want it to get in their PlayerGui when they enter, use the PlayerAdded event or wait for the admins to release the LoadingGui object.
Report Abuse
kingkiller1000 is not online. kingkiller1000
Joined: 12 Dec 2008
Total Posts: 26415
01 Apr 2012 05:01 PM
> LoadingGui object

:O
Report Abuse
commonsensical is not online. commonsensical
Joined: 11 Jan 2012
Total Posts: 258
01 Apr 2012 05:01 PM
I am using a playeradded event. How do I make it so that it goes INTO the player from lighting. Yes, its an Intro, so I only want it to go into them once.
Report Abuse
kingkiller1000 is not online. kingkiller1000
Joined: 12 Dec 2008
Total Posts: 26415
01 Apr 2012 05:04 PM
Game.Player.PlayerAdded:connect(function(Player)
Player.CharacterAdded:wait()
Game.Lighting.Intro:Clone().Parent = Player.PlayerGui
end)
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