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: Can some one make me a quick script please?

Previous Thread :: Next Thread 
23144567 is not online. 23144567
Joined: 16 Jul 2014
Total Posts: 533
14 Jul 2017 11:38 PM
I know you probably wont help, but I need a script that goes in a Part with a ClickDetector in the Part and the script will make it so when you click on the Part it removes $50 from the leaderStats and gives you a tool.
So like a shop that when you click on the part you buy a tool.


Thanks so much if you do it, I really need it for a game I am working on, I can't really script but I can build, Thanks!
Report Abuse
snowparks is not online. snowparks
Joined: 10 Apr 2017
Total Posts: 64
14 Jul 2017 11:41 PM
script.Parent.ClickDetector.MouseClick:connect(function(player)
player.leaderstats.Money.Value = player.leaderstats.Money.Value - 50
game.ServerStorage.Tool:Clone().Parent = player.BackPack
end)


Report Abuse
Ewarr1011 is not online. Ewarr1011
Joined: 12 Apr 2013
Total Posts: 203
14 Jul 2017 11:42 PM
^
Damn you're fast, I was going to help xD


MEMESSSSS
Report Abuse
snowparks is not online. snowparks
Joined: 10 Apr 2017
Total Posts: 64
14 Jul 2017 11:44 PM
u can improve it by adding a check if the user has enough money

since i was too lazy and tired to remember to do that


Report Abuse
23144567 is not online. 23144567
Joined: 16 Jul 2014
Total Posts: 533
14 Jul 2017 11:47 PM
Thanks, but can you make it so it checks if the user has enough money please?

Thanks
Report Abuse
EataPig98 is not online. EataPig98
Joined: 01 Mar 2014
Total Posts: 173
14 Jul 2017 11:54 PM
script.Parent.ClickDetector.MouseClick:connect(function(player)
if player.leaderstats.Money.Value > 49 then
player.leaderstats.Money.Value = player.leaderstats.Money.Value - 50
game.ServerStorage.Tool:Clone().Parent = player.BackPack
else
print "not enough money!"
end
end)



screw roblox updates
Report Abuse
23144567 is not online. 23144567
Joined: 16 Jul 2014
Total Posts: 533
14 Jul 2017 11:59 PM
Thanks
Report Abuse
23144567 is not online. 23144567
Joined: 16 Jul 2014
Total Posts: 533
15 Jul 2017 12:17 AM
Wow, its not putting the tool in my backpack :(
I named it right and put the tool in ServerStorage
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
15 Jul 2017 12:22 AM
Could you relay anything the output says? I did notice that "BackPack" should be lowercased to "Backpack".
Report Abuse
23144567 is not online. 23144567
Joined: 16 Jul 2014
Total Posts: 533
15 Jul 2017 12:31 AM
Okay thanks that was the problem ^



Thanks for your help guys, it works now.
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