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 » Scripters
Home Search
 

Re: Player Problem

Previous Thread :: Next Thread 
Prestonpop is not online. Prestonpop
Joined: 01 Feb 2011
Total Posts: 199
20 Aug 2015 05:56 PM
Ok, so there's only one question I have. When I got into the game this button doesn't work from Roblox itself. When I test it in solo mode in Roblox Studio, it works. The problem is here:


game.Players.Player.leaderstats.Cash.Value > 49 then
game.Players.Player.leaderstats.Cash.Value =


What's the code that you use instead of "Player" if I want it to effect any name that presses the button? I thought instead of "Player" replace with "Username" but that's not a valid line of code. Can someone please help? Feel free to ask more questions. Thanks!
Report Abuse
lsp425 is not online. lsp425
Joined: 10 Dec 2011
Total Posts: 603
20 Aug 2015 05:58 PM
LocalPlayer, but can only be used in a localscript.
Report Abuse
Eauz is not online. Eauz
Joined: 23 Jul 2013
Total Posts: 2942
20 Aug 2015 06:08 PM
change to localscript and use the player variable like this

anyPlayer = game.Players.LocalPlayer

anyPlayer:WaitForChild("leaderstats"):WaitForChild("Cash").Value > 49 then
anyPlayer:WaitForChild("leaderstats"):WaitForChild("Cash").Value =

Report Abuse
Prestonpop is not online. Prestonpop
Joined: 01 Feb 2011
Total Posts: 199
20 Aug 2015 10:15 PM
Thanks so much really appreciate it.
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