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
 

Basic player ID not working

Previous Thread :: Next Thread 
WolfgangVonPrinz is not online. WolfgangVonPrinz
Joined: 24 Oct 2013
Total Posts: 4656
30 Jul 2015 09:49 AM
local owner = player.Backpack.Owner.Value
local x = math.random(1, 10000)
owner = x

N.B This is not for data persistance. Owner is a number value in player's back pack
Women are like fine wine, I can't get their tops off
Report Abuse
WolfgangVonPrinz is not online. WolfgangVonPrinz
Joined: 24 Oct 2013
Total Posts: 4656
30 Jul 2015 09:49 AM
It reads no errors

Women are like fine wine, I can't get their tops off
Report Abuse
BlueWizard12345 is not online. BlueWizard12345
Joined: 31 Mar 2012
Total Posts: 906
30 Jul 2015 09:52 AM
local owner = player.Backpack.Owner
local x = math.random(1, 10000)
owner.Value = x
Report Abuse
QuintinityZero is not online. QuintinityZero
Joined: 01 Oct 2008
Total Posts: 10618
30 Jul 2015 09:53 AM
The 'owner' variable holds the value of the Owner value when it was initialized. It does _NOT_ hold a reference to the Value property of the IntValue/NumberValue.

The correct way to do this is

player.Backpack.Owner.Value = math.random(1, 10000)

No pointless variables required
Report Abuse
WolfgangVonPrinz is not online. WolfgangVonPrinz
Joined: 24 Oct 2013
Total Posts: 4656
30 Jul 2015 09:59 AM
This is the hierarchy: http://gyazo.com/f99171c8ec124a033fc9761c78f4cb50
And still nothing

I call the function, so it's not because of that, too.

Women are like fine wine, I can't get their tops off
Report Abuse
WolfgangVonPrinz is not online. WolfgangVonPrinz
Joined: 24 Oct 2013
Total Posts: 4656
30 Jul 2015 10:00 AM
game.Players.PlayerAdded:connect(function(player)
local stats = Instance.new("Model", player)
stats.Name = "leaderstats"
local money = Instance.new("IntValue", stats)
money.Name = "Money"
money.Value = 100000000

local stat1 = Instance.new("IntValue", stats)
stat1.Name = "Tycoon"
local stat2 = Instance.new("IntValue", stats)
stat2.Name = "Vehicles"
player.Backpack:WaitForChild("Owner")
player.Backpack.Owner.Value = math.random(1, 10000)

end

Women are like fine wine, I can't get their tops off
Report Abuse
QuintinityZero is not online. QuintinityZero
Joined: 01 Oct 2008
Total Posts: 10618
30 Jul 2015 10:28 AM
player.Backpack:WaitForChild("Owner")

^ seems like owner is never added to their backpack so this yields forever
Report Abuse
WolfgangVonPrinz is not online. WolfgangVonPrinz
Joined: 24 Oct 2013
Total Posts: 4656
30 Jul 2015 11:09 AM
Removed it, still won't fcking work XD


Women are like fine wine, I can't get their tops off
Report Abuse
WolfgangVonPrinz is not online. WolfgangVonPrinz
Joined: 24 Oct 2013
Total Posts: 4656
30 Jul 2015 11:46 AM
Plz halp

Women are like fine wine, I can't get their tops off
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