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
We use cookies to offer you a better experience. By using Roblox.com, you are agreeing to our Privacy and Cookie Policy.
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Error

Previous Thread :: Next Thread 
dashinghappy is online. dashinghappy
Joined: 14 Aug 2011
Total Posts: 1232
21 Oct 2016 10:45 PM
local plr = game.Players.LocalPlayer
local char = game.Workspace:FindFirstChild(plr.Name)
local shirt = char.Shirt

?


Report Abuse
Intended_Pun is not online. Intended_Pun
Joined: 10 Aug 2016
Total Posts: 4384
21 Oct 2016 10:49 PM
Your method isn't efficient. Try this instead:

local plr = game.Players.LocalPlayer
local char = plr.Chracter
local shirt = char:FindFirstChild("Shirt") --Returns nil if the player has no shirt.

That's not even the 100% best way but it should work.
Report Abuse
dashinghappy is online. dashinghappy
Joined: 14 Aug 2011
Total Posts: 1232
21 Oct 2016 10:54 PM
It works ty


Report Abuse
llaserx is online. llaserx
Joined: 10 Dec 2011
Total Posts: 53069
21 Oct 2016 10:59 PM
local plr = game.Players.LocalPlayer
repeat wait() until plr.Character
local char = plr.Character
local shirt = char:FindFirstChild("Shirt") --Returns nil if the player has no shirt.



Report Abuse
Lordux is not online. Lordux
Joined: 10 Jun 2010
Total Posts: 610
22 Oct 2016 12:51 AM
local plr = game.Players.LocalPlayer
game.Workspace:WaitForChild(plr.Name)
local char = plr.Character
local shirt = char.Shirt
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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