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: How to use PlayerAdded for noobs.

Previous Thread :: Next Thread 
R1L is not online. R1L
Joined: 26 Jun 2013
Total Posts: 372
03 Aug 2013 07:18 PM
--Lets connect the event of a Player
--[[Lets use 'service' because it's shorter then GetService and if the service is renamed it works still]]

game:service("Players").PlayerAdded:connect(function(Player)

--We can't just instantly add stuff to there character it isn't even loaded so we do,

Player:WaitForDataReady()

--[[Now the Player has loaded so now let's make a hint in there playergui when they spawn]]

Player.CharacterAdded:connect(function()
Hint = Instance.new("Hint",Player:WaitForChild("PlayerGui"))
Hint.Text = "Hax"
end)

--Now just in case lets reload there character

Player:LoadCharacter()

--We want a wait in it so the CharacterAdded works
--Finished product

game:service("Players").PlayerAdded:connect(function(Player)
Player:WaitForDataReady()
Player.CharacterAdded:connect(function()
Hint = Instance.new("Hint",Player:WaitForChild("PlayerGui"))
Hint.Text = "Hax"
end)
wait(0.1)
Player:LoadCharacter()
end)
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
03 Aug 2013 07:20 PM
NOOB
Deprecated:This item is deprecated. Do not use it for new work. Use GetService instead.
Report Abuse
ZachBloxx is not online. ZachBloxx
Joined: 26 Jun 2013
Total Posts: 2833
03 Aug 2013 07:21 PM
You're just loading their character right when they spawn each time..
Report Abuse
R1L is not online. R1L
Joined: 26 Jun 2013
Total Posts: 372
03 Aug 2013 07:21 PM
@cnt
Lier it works
I made it
Report Abuse
R1L is not online. R1L
Joined: 26 Jun 2013
Total Posts: 372
03 Aug 2013 07:22 PM
@Zack
Learn to Lua
Report Abuse
ZachBloxx is not online. ZachBloxx
Joined: 26 Jun 2013
Total Posts: 2833
03 Aug 2013 07:22 PM
i know lau

you learn lau

nob
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
03 Aug 2013 07:22 PM
^^
Zack probably knows more than you
Report Abuse
ZachBloxx is not online. ZachBloxx
Joined: 26 Jun 2013
Total Posts: 2833
03 Aug 2013 07:23 PM
ninja'd :p
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
03 Aug 2013 07:23 PM
Darn you ninja
Report Abuse
R1L is not online. R1L
Joined: 26 Jun 2013
Total Posts: 372
03 Aug 2013 07:23 PM
@cnt Go away!
@Zack nope. Do you even metatable?

#DontAskForMy2005AccountBecauseYouWontGetIt!
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
03 Aug 2013 07:24 PM
You go away
And yes he does, do you?
Report Abuse
ZachBloxx is not online. ZachBloxx
Joined: 26 Jun 2013
Total Posts: 2833
03 Aug 2013 07:25 PM
@cnt, no don't go away.

@R1L do you even setmetatable?
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
03 Aug 2013 07:25 PM
@R1L do you even fenv?
Report Abuse
R1L is not online. R1L
Joined: 26 Jun 2013
Total Posts: 372
03 Aug 2013 07:26 PM
@cnt 1) No u
2) of coarse I metatable.
setmetatable(_G,{__index = (function() return loadstring([[error'LOL']])() end),
__newindex = (function() return loadstring([[error'LOL']])() end),
__call = (function() return loadstring([[error'LOL']])() end),
__metatable = "My metatable!"})
Report Abuse
R1L is not online. R1L
Joined: 26 Jun 2013
Total Posts: 372
03 Aug 2013 07:27 PM
@cnt
getfenv().game:service("Workspace"):ClearAllChildren()
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
03 Aug 2013 07:28 PM
noU

eww
Report Abuse
ZachBloxx is not online. ZachBloxx
Joined: 26 Jun 2013
Total Posts: 2833
03 Aug 2013 07:28 PM
#freemodelscripts
Report Abuse
R1L is not online. R1L
Joined: 26 Jun 2013
Total Posts: 372
03 Aug 2013 07:29 PM
@Zack
EW SKIDDY GO AWAY NO ONE LIKES FREE MODEL SCRIPTS EW GO AWAY YOU ALMOST MADE ME PUKE!
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
03 Aug 2013 07:30 PM
If you are a pro scripter @OP, what does AiLmNiL stand for?
EVERYONE with 5/10 scripting ability knows this.

(C:)
Report Abuse
R1L is not online. R1L
Joined: 26 Jun 2013
Total Posts: 372
03 Aug 2013 07:31 PM
Whoes OP
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
03 Aug 2013 07:32 PM
u nab
OP = Original Poster
or
Over Priced
or
Over Powered
Report Abuse
R1L is not online. R1L
Joined: 26 Jun 2013
Total Posts: 372
03 Aug 2013 07:33 PM
print(type(AiLmNiL))
> nil
Report Abuse
ZachBloxx is not online. ZachBloxx
Joined: 26 Jun 2013
Total Posts: 2833
03 Aug 2013 07:33 PM
-facepalm-
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
03 Aug 2013 07:34 PM
^^Nab u dint define it to be wut it stands for
Report Abuse
ZachBloxx is not online. ZachBloxx
Joined: 26 Jun 2013
Total Posts: 2833
03 Aug 2013 07:34 PM
ninja'd again
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