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: How to make a buy script? o.0

Previous Thread :: Next Thread 
cyclone3260 is not online. cyclone3260
Joined: 23 Aug 2010
Total Posts: 1038
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
cyclone3260 is not online. cyclone3260
Joined: 23 Aug 2010
Total Posts: 1038
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 is not online. Windburnt
Joined: 16 Jul 2012
Total Posts: 144
09 Sep 2012 12:56 PM
Check if (gold-price>=0).
Report Abuse
velibor is not online. 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
cyclone3260 is not online. cyclone3260
Joined: 23 Aug 2010
Total Posts: 1038
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
cyclone3260 is not online. cyclone3260
Joined: 23 Aug 2010
Total Posts: 1038
09 Sep 2012 01:17 PM
@Velibor: And why would you even check my profile before answering my question??
Report Abuse
Sharpshooter26 is not online. Sharpshooter26
Joined: 26 May 2010
Total Posts: 5166
09 Sep 2012 01:18 PM
Youre primary group
Report Abuse
ninjaknight101 is not online. ninjaknight101
Joined: 04 Apr 2011
Total Posts: 1281
09 Sep 2012 01:37 PM
It's under your name.
~Robotics is my Robotnik~
Report Abuse
cyclone3260 is not online. cyclone3260
Joined: 23 Aug 2010
Total Posts: 1038
09 Sep 2012 01:52 PM
............


Help with the script please?
Report Abuse
sirsavary is not online. 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
notsopwnedg is not online. notsopwnedg
Joined: 07 Nov 2010
Total Posts: 4182
09 Sep 2012 02:32 PM
http://pastebin DOT com/RSY6XF2z

--roblox says it's inappropriate...
Report Abuse
Cheater is not online. 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
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