|
| 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
|
  |
| 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
|
  |
| Joined: 24 Jun 2013 |
| Total Posts: 4416 |
|
| |
|
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
|
  |
| 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 |
|
|
| |
|
|
| 19 Jul 2017 07:12 PM |
@Mr_Punch it didnt work would i have to edit it a little?
|
|
|
| Report Abuse |
|
|
nullfeels
|
  |
| Joined: 31 Mar 2017 |
| Total Posts: 1215 |
|
| |
|
|
| 19 Jul 2017 07:27 PM |
I didnt do anything wrong. it just doesnt give money
|
|
|
| Report Abuse |
|
|
|
| 19 Jul 2017 07:31 PM |
| some of the values might have different names. change them to your values names |
|
|
| Report Abuse |
|
|
|
| 19 Jul 2017 07:33 PM |
Yup there the same. I think there might be a error in the script
|
|
|
| Report Abuse |
|
|
|
| 19 Jul 2017 07:35 PM |
| I don't think its the script sorrs |
|
|
| Report Abuse |
|
|
|
| 19 Jul 2017 07:39 PM |
On My Leaderboard its called Money is that ok for the script?
|
|
|
| Report Abuse |
|
|
| |
|
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 |
|
|
| |
|
| |
|