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: Is this possible?

Previous Thread :: Next Thread 
im2awsm is not online. im2awsm
Joined: 25 Aug 2010
Total Posts: 2295
12 Nov 2011 05:51 PM
Hi, i was thinking, would it be possible to make a sort of crafting system? Like, when you clicked a button, it checked if you had (example) a box of SPAM (yes the food, lawl) and a cannon, it checked then removed those items and gave you a new one from lighting, the Spam Cannon. I am HORRIBLE with onClicked, i dont even know if thats what its called... So, if anyone know how to do this, could you answer on the forum? To count this as a help, not a request, i made a rough copy of the script, that is bound not to work, as i cant think straight today:

begin onClicked
if Player.Backpack has SpamBox 1
if Player.Backpack has Cannon 1 --Blargh.. hate this.. wont work, horrible.
then
Player.Backpack.SpamBox:remove()
Player.Backpack.Cannon:remove() --Problem here..will this remove ALL of the spamboxes and cannons they have!?!
game.Lighting.SpamCannon:clone()
SpamCannon.Parent = Player --Ok, i suck at this.
elseif --is it else if or elseif? BLARGH
end

Wow that looks horrible, well, anyone?
Report Abuse
im2awsm is not online. im2awsm
Joined: 25 Aug 2010
Total Posts: 2295
12 Nov 2011 05:52 PM
Please dont hate if thats what your expecting to do :P
Report Abuse
Darkmist101 is not online. Darkmist101
Joined: 30 Jul 2010
Total Posts: 6208
12 Nov 2011 05:59 PM

script.Parent.MouseButton1Down:connect(function()

local Obj1 = Player.Backpack:FindFisrtChild("SpamBox")
local Obj2 = Player.Backpack:FindFisrtChild("Cannon")

if Obj1 ~= nil and Obj2 ~= nil then
Obj1:remove()
Obj2:remove()
game.Lighting.SpamCannon:clone().Parent = Player.Backpack
else
return end
end
end)
Report Abuse
im2awsm is not online. im2awsm
Joined: 25 Aug 2010
Total Posts: 2295
12 Nov 2011 06:07 PM
Thank you very much! Ill try it now.
Report Abuse
BunnyBoy26 is not online. BunnyBoy26
Joined: 17 Jun 2010
Total Posts: 5674
12 Nov 2011 06:10 PM
I can see how that script two above won't work without having to test it.
Report Abuse
im2awsm is not online. im2awsm
Joined: 25 Aug 2010
Total Posts: 2295
12 Nov 2011 06:16 PM
Oh. Why wont it?
Report Abuse
BunnyBoy26 is not online. BunnyBoy26
Joined: 17 Jun 2010
Total Posts: 5674
12 Nov 2011 06:19 PM
I have a feeling Darkmist has no idea what 'return end' really does, he just uses it.


Simply delete the consecutive words of: 'else return end' and you will be fine.
Report Abuse
Willingroblox123 is not online. Willingroblox123
Joined: 18 Jan 2010
Total Posts: 6872
12 Nov 2011 06:39 PM
Did you not see this?
local Obj1 = Player.Backpack:FindFisrtChild("SpamBox")
local Obj2 = Player.Backpack:FindFisrtChild("Cannon")

Needs to be
local Obj1 = Player.Backpack:findFirstChild("SpamBox")
local Obj2 = Player.Backpack:findFirstChild("Cannon")
Report Abuse
BunnyBoy26 is not online. BunnyBoy26
Joined: 17 Jun 2010
Total Posts: 5674
12 Nov 2011 06:58 PM
The only difference I see is the 'F' is made into 'f'...won't change a thing.
Report Abuse
Willingroblox123 is not online. Willingroblox123
Joined: 18 Jan 2010
Total Posts: 6872
12 Nov 2011 07:01 PM
Look how the word 'first' is spelled.
Report Abuse
BunnyBoy26 is not online. BunnyBoy26
Joined: 17 Jun 2010
Total Posts: 5674
12 Nov 2011 07:06 PM
Oh.
Report Abuse
im2awsm is not online. im2awsm
Joined: 25 Aug 2010
Total Posts: 2295
12 Nov 2011 10:07 PM
Does Darkmists script need to be a local script or normal?
Report Abuse
BunnyBoy26 is not online. BunnyBoy26
Joined: 17 Jun 2010
Total Posts: 5674
13 Nov 2011 09:42 AM
normal
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