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: Problem I've never knew how to solve..

Previous Thread :: Next Thread 
Surgo is not online. Surgo
Joined: 11 Jan 2011
Total Posts: 2748
10 Jun 2014 04:47 AM
if Player:FindFirstChild("leaderstats").KOs== 10 then

end

How do you define Player?
Report Abuse
lampwnage121 is not online. lampwnage121
Joined: 20 Oct 2012
Total Posts: 4285
10 Jun 2014 04:50 AM
wat...
Have you never learned about variables in math class?
Player = game.Players.PLAYERNAME
if Player:FindFirstChild("leaderstats").KOs== 10 then

end

or

if game.Players.PLAYERNAME:FindFirstChild("leaderstats").KOs== 10 then

end
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
10 Jun 2014 05:17 AM
Why don't you just do .leaderstats and add a .Value after KOs?
Report Abuse
lampwnage121 is not online. lampwnage121
Joined: 20 Oct 2012
Total Posts: 4285
10 Jun 2014 05:30 AM
Ohh, Right, You'll need to fetch the Value property.
Report Abuse
VolcanoINC is not online. VolcanoINC
Joined: 19 Sep 2008
Total Posts: 1395
10 Jun 2014 06:45 AM
Depends. Are you running this from a LocalScript or a Script? Where is the script located?
Report Abuse
eletrowiz is not online. eletrowiz
Joined: 08 Dec 2008
Total Posts: 12438
10 Jun 2014 06:49 AM
To find it from a LocalScript, use player = game.Players.LocalPlayer
To find it from a Script, you need to find the character, then use
player = game.Players:GetPlayerFromCharacter(character)
Report Abuse
Surgo is not online. Surgo
Joined: 11 Jan 2011
Total Posts: 2748
10 Jun 2014 02:46 PM
No, I'm trying to find a Global player. Like anyone in the server, not just one person in particular.
Report Abuse
Perci1 is not online. Perci1
Joined: 24 Jan 2011
Total Posts: 1027
10 Jun 2014 02:51 PM
To get all the players loop through them with a for loop.
Report Abuse
Surgo is not online. Surgo
Joined: 11 Jan 2011
Total Posts: 2748
10 Jun 2014 02:52 PM
Like for anther example, I'm not sure this would work..

local LevelUpLight= Instance.new ("PointLight" ,game.Players:FindFirstChild("Head"))
Report Abuse
Surgo is not online. Surgo
Joined: 11 Jan 2011
Total Posts: 2748
10 Jun 2014 03:08 PM
b
Report Abuse
Perci1 is not online. Perci1
Joined: 24 Jan 2011
Total Posts: 1027
10 Jun 2014 04:08 PM
Well, it would work if a player's name was "Head"
Report Abuse
Surgo is not online. Surgo
Joined: 11 Jan 2011
Total Posts: 2748
10 Jun 2014 05:38 PM
How would I find it then
Report Abuse
Surgo is not online. Surgo
Joined: 11 Jan 2011
Total Posts: 2748
11 Jun 2014 12:31 AM
b
Report Abuse
Kratos232 is not online. Kratos232
Joined: 28 Oct 2011
Total Posts: 229
11 Jun 2014 12:33 AM
OMG
Player = Game.Players["NAMEHERE"]
That's how!

~I like Toast~
Report Abuse
Surgo is not online. Surgo
Joined: 11 Jan 2011
Total Posts: 2748
11 Jun 2014 01:51 PM
No. I don't want ONE person in particular
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