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
 

will work yes?

Previous Thread :: Next Thread 
Keyrut is not online. Keyrut
Joined: 23 Nov 2011
Total Posts: 6501
13 Aug 2012 04:35 PM
function onTouch(hit)
local h = hit.Parent:FindFirstChild("Humanoid")
if h ~= nil and debounce == false then
debounce = true
playsound:play()
local Wallet = game.Players:findfirstChild(h.Parent.Name):findFirstChild("leaderstats")
if(Wallet ~= nil and Wallet.Cash.Value >= costperplay) then -- change 'Credits' to your money name
Wallet.Credits.Value = Wallet.Cash.Value - costperplay-- change 'Credits' to your money name
-- change the color of the start brick
script.Parent.BrickColor = BrickColor.Black()
-- lets randomise the colors for a bit
end
Report Abuse
BlueTaslem is not online. BlueTaslem
Joined: 11 May 2008
Total Posts: 11060
13 Aug 2012 04:40 PM
You have no connection displayed.
You never set debounce to false.
It will error upon contact with bullets.
Report Abuse
usama8800 is not online. usama8800
Joined: 29 Dec 2009
Total Posts: 225
13 Aug 2012 04:40 PM
What do you mean will work? havnt you tested it?
btw
local Wallet = game.Players:getPlayerFromCharacter(h.Parent.Name):findFirstChild("leaderstats")
script.Parent.BrickColor = BrickColor..new("Black")
after changing these 2 lines. it should but i think
Wallet.Credits.Value = Wallet.Cash.Value - costperplay
line might have an error
Report Abuse
Keyrut is not online. Keyrut
Joined: 23 Nov 2011
Total Posts: 6501
13 Aug 2012 04:41 PM
here ill post the full script k?
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