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
 

Help!

Previous Thread :: Next Thread 
sparklyemeralds is online. sparklyemeralds
Joined: 16 Nov 2015
Total Posts: 61
19 Jul 2017 06:26 PM
I need help for a script. The script is when you touch a part/block you get 10 thousond money on the leaderboard. I hope somebody can help! btw i cant script at all so can you give the full script.



Report Abuse
Mr_Crunch is not online. Mr_Crunch
Joined: 16 Jul 2016
Total Posts: 275
19 Jul 2017 06:33 PM
Script inside a brick

script.Parent.Touched:connect(function(part)
local player = game.Players:GetPlayerFromCharacter(part.Parent)
if player then
player.leaderstats.Money = player.leaderstats.Money + 10000
end
end)

the scripters forum isn't your own scripting army but enjoy this little script that took me 1 minute to write up
Report Abuse
LaeMVP is online. LaeMVP
Joined: 24 Jun 2013
Total Posts: 4416
19 Jul 2017 06:37 PM
Connect not connect
Report Abuse
Mr_Crunch is not online. Mr_Crunch
Joined: 16 Jul 2016
Total Posts: 275
19 Jul 2017 06:40 PM
theres really not a difference at all if you use :connect() or :Connect(). its just :connect() is the deprecated method and its said to use :Connect() but i don't really see any difference.
Report Abuse
nullfeels is not online. nullfeels
Joined: 31 Mar 2017
Total Posts: 1215
19 Jul 2017 07:07 PM
^^
In the case of connect vs Connect there isn't a difference outside of the deprecation, and it was deprecated for stylistic reasons(preferring function names to start with capital letters).

It's a bad idea to use deprecated code though regardless of the reason it was deprecated so all new code should use Connect().
Report Abuse
sparklyemeralds is online. sparklyemeralds
Joined: 16 Nov 2015
Total Posts: 61
19 Jul 2017 07:08 PM
ok thx ima try it!


Report Abuse
sparklyemeralds is online. sparklyemeralds
Joined: 16 Nov 2015
Total Posts: 61
19 Jul 2017 07:12 PM
@Mr_Punch it didnt work would i have to edit it a little?


Report Abuse
nullfeels is not online. nullfeels
Joined: 31 Mar 2017
Total Posts: 1215
19 Jul 2017 07:25 PM
errors?
Report Abuse
sparklyemeralds is online. sparklyemeralds
Joined: 16 Nov 2015
Total Posts: 61
19 Jul 2017 07:27 PM
I didnt do anything wrong. it just doesnt give money


Report Abuse
LittleFruitCake is not online. LittleFruitCake
Joined: 17 May 2013
Total Posts: 802
19 Jul 2017 07:31 PM
some of the values might have different names. change them to your values names
Report Abuse
sparklyemeralds is online. sparklyemeralds
Joined: 16 Nov 2015
Total Posts: 61
19 Jul 2017 07:33 PM
Yup there the same. I think there might be a error in the script


Report Abuse
LittleFruitCake is not online. LittleFruitCake
Joined: 17 May 2013
Total Posts: 802
19 Jul 2017 07:35 PM
I don't think its the script sorrs
Report Abuse
sparklyemeralds is online. sparklyemeralds
Joined: 16 Nov 2015
Total Posts: 61
19 Jul 2017 07:39 PM
On My Leaderboard its called Money is that ok for the script?



Report Abuse
BunnyBoy26 is not online. BunnyBoy26
Joined: 17 Jun 2010
Total Posts: 5674
19 Jul 2017 07:43 PM
What does the output say?
Report Abuse
Mr_Crunch is not online. Mr_Crunch
Joined: 16 Jul 2016
Total Posts: 275
19 Jul 2017 07:43 PM
script.Parent.Touched:connect(function(part)
local player = game.Players:GetPlayerFromCharacter(part.Parent)
if player then
player.leaderstats.Money.Value = player.leaderstats.Money.Value + 10000
end
end)

was a little error lol try that
Report Abuse
sparklyemeralds is online. sparklyemeralds
Joined: 16 Nov 2015
Total Posts: 61
19 Jul 2017 07:46 PM
Thx! It worked


Report Abuse
LittleFruitCake is not online. LittleFruitCake
Joined: 17 May 2013
Total Posts: 802
19 Jul 2017 07:46 PM
gg mr crunch
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