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: Would this work?

Previous Thread :: Next Thread 
madness725 is not online. madness725
Joined: 19 Apr 2011
Total Posts: 2058
18 Jul 2013 10:36 PM
I want it to display KDR or Kill Death Ratio on a text gui.

plyr = game.Players.LocalPlayer

kill, death = plyr.leaderstats:findFirstChild("KOs"), plyr.leaderstats:findFirstChild("Wipeouts")

while wait(5) do
Gui.Text = kill.Value / death.Value;
end
Report Abuse
madness725 is not online. madness725
Joined: 19 Apr 2011
Total Posts: 2058
18 Jul 2013 10:37 PM
plyr = game.Players.LocalPlayer

kill, death = plyr.leaderstats:findFirstChild("KOs"), plyr.leaderstats:findFirstChild("Wipeouts")

while wait(5) do
script.Parent.Text = kill.Value / death.Value;
end

-- I meant to put that
Report Abuse
oxcool1 is not online. oxcool1
Joined: 05 Nov 2009
Total Posts: 15444
18 Jul 2013 10:42 PM
Ya should work fine. But just to make sure that the script won't error for attempting to put a number value on the text instead of a string...

Use tostring(kill.Value/death.value)
Report Abuse
madness725 is not online. madness725
Joined: 19 Apr 2011
Total Posts: 2058
18 Jul 2013 10:56 PM
What is tostring?
Report Abuse
kinglime is not online. kinglime
Joined: 27 Jun 2008
Total Posts: 2751
18 Jul 2013 11:00 PM
What doe using that " / " do?
Report Abuse
madness725 is not online. madness725
Joined: 19 Apr 2011
Total Posts: 2058
19 Jul 2013 12:01 PM
Divides the kills by deaths
Report Abuse
IAmReallyAwesome is not online. IAmReallyAwesome
Joined: 05 Mar 2010
Total Posts: 7371
19 Jul 2013 12:03 PM
Gui.Text = kill.Value .. "/" .. death.Value

*Tell me about the rabbits, George*
Report Abuse
madness725 is not online. madness725
Joined: 19 Apr 2011
Total Posts: 2058
19 Jul 2013 12:14 PM
I want it to display a number like, if you had 10 kills and 2 deaths it would be 5 not 10/2
Report Abuse
Fedorakid is not online. Fedorakid
Joined: 17 Jul 2010
Total Posts: 7079
19 Jul 2013 12:15 PM
^

Not above. He wanted to divide. And that isn't a string. It is a script itself.
Report Abuse
Fedorakid is not online. Fedorakid
Joined: 17 Jul 2010
Total Posts: 7079
19 Jul 2013 12:16 PM
Ment iam to dat arrow :p
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