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: How to edit a specific players gui

Previous Thread :: Next Thread 
albiin900 is not online. albiin900
Joined: 11 Dec 2013
Total Posts: 5
07 Jan 2015 01:19 PM
Hello everyone!
I have a little problem, and i hope that someone here have the solution!

I have a line of code that should change the players gui:
Game.Players.PlayerName.PlayerGui.ScreenGui.Frame.Totalmoney.Value = 100

(PlayerName is the players name)

It outputs 'PlayerName is not a valid member of Players' which i can understand why but how can i fix it?
Report Abuse
eLunate is not online. eLunate
Joined: 29 Jul 2014
Total Posts: 13268
07 Jan 2015 01:23 PM
Game.Players.PlayerName.PlayerGui.ScreenGui.Frame.Totalmoney.Value = 100
...
Game.Players.PlayerName

...
I hope you're actually kidding me or I will risk life and limb to steal Russia's nuclear weapons -just- to nuke your computer.
Report Abuse
albiin900 is not online. albiin900
Joined: 11 Dec 2013
Total Posts: 5
07 Jan 2015 01:48 PM
...
Report Abuse
Poloboy567 is not online. Poloboy567
Joined: 24 Jun 2008
Total Posts: 62
07 Jan 2015 01:49 PM
First, make sure the script is a local script. Next, add this variable to the top of the script:

local player = game.Players.LocalPlayer

And modify the line you have to look like this:

game.Players:FindFirstChild(player.Name).PlayerGui.ScreenGui.Frame.Totalmoney.Value = 100

It should work then.
Report Abuse
albiin900 is not online. albiin900
Joined: 11 Dec 2013
Total Posts: 5
07 Jan 2015 01:53 PM
Thanks!!!!
Report Abuse
128GB is not online. 128GB
Joined: 17 Apr 2014
Total Posts: 8056
07 Jan 2015 01:54 PM
'local player = game.Players.LocalPlayer

And modify the line you have to look like this:

game.Players:FindFirstChild(player.Name).PlayerGui.ScreenGui.Frame.Totalmoney.Value = 100'


You already got the local player why not just do

local player = game.Players.LocalPlayer
player.PlayerGui.ScreenGui.Frame.Totalmoney.Value = 100
Report Abuse
Poloboy567 is not online. Poloboy567
Joined: 24 Jun 2008
Total Posts: 62
07 Jan 2015 01:59 PM
^ Ahh yeah, very true. Oops.
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