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 would I give the winner leaderstats

Previous Thread :: Next Thread 
Randy_Moss is not online. Randy_Moss
Joined: 05 Aug 2009
Total Posts: 30511
28 Jul 2016 08:02 PM
I want to give them + 1 win

if #Players == 1 then
game.ReplicatedStorage.WriteGui:FireAllClients(Players[1].Name.." has won!")
wait(5)
break







How do I give the person that won +1 win

the leaderstats is named
Wins




Report Abuse
thedailyblarg is not online. thedailyblarg
Joined: 26 Feb 2012
Total Posts: 5506
28 Jul 2016 08:06 PM
player.leaderstats.Wins.Value = player.leaderstats.Wins.Value + 1
Report Abuse
Randy_Moss is not online. Randy_Moss
Joined: 05 Aug 2009
Total Posts: 30511
28 Jul 2016 08:07 PM
then it asks to define player.


Report Abuse
thedailyblarg is not online. thedailyblarg
Joined: 26 Feb 2012
Total Posts: 5506
28 Jul 2016 08:08 PM
Because player was an example variable .-.
*facepaw*
Report Abuse
Real_Edgy is not online. Real_Edgy
Joined: 23 Oct 2013
Total Posts: 1212
28 Jul 2016 08:08 PM
Please. If you don't understand how to fix something as simple as this you shouldn't be on this subforum.
Report Abuse
Randy_Moss is not online. Randy_Moss
Joined: 05 Aug 2009
Total Posts: 30511
28 Jul 2016 08:08 PM
while true do

if #Players == 1 then
game.ReplicatedStorage.WriteGui:FireAllClients(Players[1].Name.." has won!")
player.leaderstats.Wins.Value = player.leaderstats.Wins.Value + 1


wait(5)
break


full


Report Abuse
Randy_Moss is not online. Randy_Moss
Joined: 05 Aug 2009
Total Posts: 30511
28 Jul 2016 08:09 PM
Idk how to define the player into that qq


Report Abuse
thedailyblarg is not online. thedailyblarg
Joined: 26 Feb 2012
Total Posts: 5506
28 Jul 2016 08:10 PM
If you don't know what a Variable is or how to replace code then you should study a little more buddy. Just saying
Report Abuse
Randy_Moss is not online. Randy_Moss
Joined: 05 Aug 2009
Total Posts: 30511
28 Jul 2016 08:11 PM
Ik what a variable is but this isn't a local script so I can't just do

local player = game.Players.LocalPlayer

idk qq


Report Abuse
thedailyblarg is not online. thedailyblarg
Joined: 26 Feb 2012
Total Posts: 5506
28 Jul 2016 08:11 PM
local player = Players[1]

.......... .-.
Report Abuse
Randy_Moss is not online. Randy_Moss
Joined: 05 Aug 2009
Total Posts: 30511
28 Jul 2016 08:13 PM
thanks for helping a noob out gg


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