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: DataP Saved Units

Previous Thread :: Next Thread 
4444vince2 is not online. 4444vince2
Joined: 08 Nov 2008
Total Posts: 4880
21 Jan 2014 02:06 AM
How would you see how many units have been saved?
(What fucntion?)
Report Abuse
4444vince2 is not online. 4444vince2
Joined: 08 Nov 2008
Total Posts: 4880
21 Jan 2014 03:10 AM
Well uhh.. anyone know?
Report Abuse
Saiose is not online. Saiose
Joined: 06 Sep 2013
Total Posts: 5759
21 Jan 2014 03:12 AM
print(game.Players.LocalPlayer.DataComplexity)
Report Abuse
4444vince2 is not online. 4444vince2
Joined: 08 Nov 2008
Total Posts: 4880
21 Jan 2014 04:57 AM
thank you.
Can you do it without a localscript?
Report Abuse
zac4545 is not online. zac4545
Joined: 19 Aug 2009
Total Posts: 2324
21 Jan 2014 05:06 AM
http://wiki.roblox.com/index.php/DataComplexity
Report Abuse
4444vince2 is not online. 4444vince2
Joined: 08 Nov 2008
Total Posts: 4880
21 Jan 2014 05:09 AM
So i can use it without a localscript...?
(In a normal script)
Report Abuse
4444vince2 is not online. 4444vince2
Joined: 08 Nov 2008
Total Posts: 4880
21 Jan 2014 05:11 AM
Well w/e i will try it without a localscript and see.
Report Abuse
4444vince2 is not online. 4444vince2
Joined: 08 Nov 2008
Total Posts: 4880
21 Jan 2014 05:31 AM
p = the player, and no this isnt how i get the player ovs!

function a()
print(p.DataComplexity)
end

p.DataComplexity.Changed:connect(a)

so is it possible so use onchanged with DC?
Report Abuse
zac4545 is not online. zac4545
Joined: 19 Aug 2009
Total Posts: 2324
21 Jan 2014 05:34 AM
no,

p = the player, and no this isnt how i get the player ovs!
prev = 0

function a()
if not p.DataComplexity == prev then
print(p.DataComplexity)
prev = p.DataComplxity
end
end

p.Changed:connect(a)
Report Abuse
4444vince2 is not online. 4444vince2
Joined: 08 Nov 2008
Total Posts: 4880
21 Jan 2014 06:34 AM
That isn't working i tried it in a loalscript and a normal script...
Report Abuse
Azarth is not online. Azarth
Joined: 17 Aug 2012
Total Posts: 2760
21 Jan 2014 06:37 AM
DataP doesn't work in anything but online, so this won't either. Judging by the print, you aren't testing online.
Report Abuse
4444vince2 is not online. 4444vince2
Joined: 08 Nov 2008
Total Posts: 4880
21 Jan 2014 06:37 AM
Yes i am.
Report Abuse
Azarth is not online. Azarth
Joined: 17 Aug 2012
Total Posts: 2760
21 Jan 2014 06:45 AM
game.Players.PlayerAdded:connect(function(plr)
plr.Chatted:connect(function(msg)
if msg:lower() == "data/" then
local m = Instance.new("Message", plr.PlayerGui)
m.Text = plr.Name.. "/ " ..plr.DataComplexity
game.Debris:AddItem(m,1)
end
end)
end)
Report Abuse
Azarth is not online. Azarth
Joined: 17 Aug 2012
Total Posts: 2760
21 Jan 2014 06:46 AM
Might wanna add plr:WaitForDataReady() too.
Report Abuse
4444vince2 is not online. 4444vince2
Joined: 08 Nov 2008
Total Posts: 4880
21 Jan 2014 06:49 AM
uhh.. I'm using it un a Gui.. >_>
Report Abuse
Azarth is not online. Azarth
Joined: 17 Aug 2012
Total Posts: 2760
21 Jan 2014 06:50 AM
Then convert what I did in to a GUI.
Report Abuse
Azarth is not online. Azarth
Joined: 17 Aug 2012
Total Posts: 2760
21 Jan 2014 06:51 AM

p.Changed:connect(function(ob)
if ob == "DataComplexity" then
print("Changed")
end
end)

No idea if that'll work, never use that property before.
Report Abuse
Azarth is not online. Azarth
Joined: 17 Aug 2012
Total Posts: 2760
21 Jan 2014 06:54 AM
it'll work, tested.


game.Players.PlayerAdded:connect(function(plr)
plr.Changed:connect(function(ob)
if ob == "DataComplexity" then
Instance.new("Message", plr.PlayerGui).Text = "Changed"
end
end)
plr:WaitForDataReady()
plr:SaveNumber("randy", 10)
end)
Report Abuse
4444vince2 is not online. 4444vince2
Joined: 08 Nov 2008
Total Posts: 4880
21 Jan 2014 07:08 AM
Why is it saving randy 10 w/e that is...?
and here is what i'm using atm.

p = script.Parent.Parent.Parent.Parent.Parent
p:WaitForDataReady()
prev = 0

function a()
if not p.DataComplexity == prev then
script.Parent.Text = "Saved Units: "..p.DataComplexity.." / 45000"
prev = p.DataComplxity
end end

p.Changed:connect(a)
Report Abuse
4444vince2 is not online. 4444vince2
Joined: 08 Nov 2008
Total Posts: 4880
21 Jan 2014 07:18 AM
It's not working as well...
Report Abuse
Azarth is not online. Azarth
Joined: 17 Aug 2012
Total Posts: 2760
21 Jan 2014 07:20 AM
because it was for testing purposes.

p = script.Parent.Parent.Parent.Parent.Parent
p:WaitForDataReady()
prev ={ val = p.DataComplexity }

p.Changed:connect(function(ob)
if ob == "DataComplexity" and prev.val ~= p.DataComplexity then
script.Parent.Text = "Saved Units: "..p.DataComplexity.." / 45000"
prev.val = p.DataComplexity
end
end

Report Abuse
4444vince2 is not online. 4444vince2
Joined: 08 Nov 2008
Total Posts: 4880
21 Jan 2014 07:31 AM
uhh.. it isn't working :/
Report Abuse
4444vince2 is not online. 4444vince2
Joined: 08 Nov 2008
Total Posts: 4880
21 Jan 2014 07:40 AM
Erm.. idk why its not working maybe you cant use OnChanged with DC...?
Report Abuse
4444vince2 is not online. 4444vince2
Joined: 08 Nov 2008
Total Posts: 4880
21 Jan 2014 08:02 AM
Uhh... i need this to work :l but it isn't working :c
Report Abuse
4444vince2 is not online. 4444vince2
Joined: 08 Nov 2008
Total Posts: 4880
21 Jan 2014 09:00 AM
Aw comeon i need sum helpz...
I tryed it in a local script and normal script did not wor in ethier.. :/
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