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 do I 'index' a player?

Previous Thread :: Next Thread 
xXRALXx is not online. xXRALXx
Joined: 12 Mar 2008
Total Posts: 153
24 Apr 2014 05:42 PM
local asset = "http://www.roblox.com/asset/?id="

local Decal = Instance.new("Decal")
Decal.Name = "Face"
Decal.Face = "Front"
Decal.Texture = asset .. player.PlayerGui.PersistentModel.FaceTexture.Value
Decal.Parent = script.Parent

ERROR: Workspace.Player1.FakeHead.LocalScript:6: attempt to index global 'player' (a nil value)





Report Abuse
RoflBread is not online. RoflBread
Joined: 18 Jun 2009
Total Posts: 3803
24 Apr 2014 05:43 PM
You haven't defined the variable 'player'
Report Abuse
xXRALXx is not online. xXRALXx
Joined: 12 Mar 2008
Total Posts: 153
24 Apr 2014 05:44 PM
Do you know how to index the current player?
Report Abuse
Spongocardo is not online. Spongocardo
Joined: 06 Sep 2008
Total Posts: 2843
24 Apr 2014 05:45 PM
You need to define the player variable, otherwise it won't "index" it.

Here's my siggy... Done.
Report Abuse
RoflBread is not online. RoflBread
Joined: 18 Jun 2009
Total Posts: 3803
24 Apr 2014 05:45 PM
Looks like it's in a local script so,

player = game.Players.LocalPlayer
Report Abuse
xXRALXx is not online. xXRALXx
Joined: 12 Mar 2008
Total Posts: 153
24 Apr 2014 05:52 PM
Of course... Thank you.
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