|
| 09 Sep 2012 12:44 PM |
script.Parent.Touched:connect(function(hit) if hit.Parent:FindFirstChild("Humanoid") then hit.Parent.LeaderBoard.Gold = -1 end end) |
|
|
| Report Abuse |
|
|
|
| 09 Sep 2012 12:46 PM |
Oh and you don't have enough gold.. How can I get that to just.. not do anything?
Is it..
script.Parent.Touched:connect(function(hit) if hit.Parent:FindFirstChild("Humanoid") then if hit.Parent.LeaderBoard.Gold ~= 5 or 5+ then return end end) end ---
I know I sound vvery nooby at scripting. But it's just this Gold thing.. e.e |
|
|
| Report Abuse |
|
|
Windburnt
|
  |
| Joined: 16 Jul 2012 |
| Total Posts: 144 |
|
| |
|
velibor
|
  |
| Joined: 24 Nov 2009 |
| Total Posts: 1003 |
|
|
| 09 Sep 2012 01:01 PM |
May I ask one thing.
You are inside a group called The elite scripters of Robloxia
And you can't even create a decent buy button ??
|
|
|
| Report Abuse |
|
|
|
| 09 Sep 2012 01:04 PM |
@Velibor: It never came to me. I can make my own commands. But I never actually tried to make a buy button.. So..
|
|
|
| Report Abuse |
|
|
|
| 09 Sep 2012 01:17 PM |
| @Velibor: And why would you even check my profile before answering my question?? |
|
|
| Report Abuse |
|
|
| |
|
|
| 09 Sep 2012 01:37 PM |
It's under your name. ~Robotics is my Robotnik~ |
|
|
| Report Abuse |
|
|
|
| 09 Sep 2012 01:52 PM |
............
Help with the script please? |
|
|
| Report Abuse |
|
|
sirsavary
|
  |
| Joined: 27 May 2008 |
| Total Posts: 1222 |
|
|
| 09 Sep 2012 02:10 PM |
1. Have you verified that Leaderboard is inside the player's character, and not the actual player? 2. if (playerGold >= price) --Allow purchase else --Do not allow purchase |
|
|
| Report Abuse |
|
|
|
| 09 Sep 2012 02:32 PM |
http://pastebin DOT com/RSY6XF2z
--roblox says it's inappropriate... |
|
|
| Report Abuse |
|
|
Cheater
|
  |
| Joined: 29 Jun 2007 |
| Total Posts: 5258 |
|
|
| 09 Sep 2012 02:46 PM |
You first of all need a leaderboard script that creates "gold". You can look that up in the wiki. After that you need your stuff that will be given (for example tools) and put it into Lighting (or somewhere). After this, it's your script's turn. This script could help you a bit further:
script.Parent:connect(function Touch(hit) if (hit.Parent:findFirstChild("Humanoid")) then gold = game.Players:GetPlayerFromCharacter(hit.Parent).leaderstats:findFirstChild("Gold") if gold.Value >= 5 then --do stuff here if it's 5 or more else --do stuff here if it's below 5 end end end) |
|
|
| Report Abuse |
|
|