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: I don't even know what to call this

Previous Thread :: Next Thread 
killajake25 is not online. killajake25
Joined: 31 Jan 2011
Total Posts: 1713
10 Sep 2013 03:57 PM
I hate a sword which when you press p it "Places" it in your inventory (GUI) and removes the tool.
It works apart from one thing, when I press P it places ALL the swords in my backpack into the GUI.
At least it sorts them okay, but I'm not sure what causes it.

function backpack(key)
name = play.Character.Name
local item = script.Parent.Item.Value
for i=1,14 do
local slot = game.Players[name].PlayerGui.Inv.Frame:findFirstChild("Slot"..i)
if slot.Empty.Value == true then
if done == false then
slot.Empty.Value = false
slot.Gear.Value = true
slot.Item.Value = item
script.Parent:Remove()
done = true
end
else
faults = faults + 1
end
if faults == 14 then
script.Parent.Name = "Inventory Full"
wait(3)
script.Parent.Name = ""..item..""
end
end
end
Report Abuse
janthran is not online. janthran
Joined: 15 May 2009
Total Posts: 17429
10 Sep 2013 03:59 PM
Target the actual name of the tool
Report Abuse
killajake25 is not online. killajake25
Joined: 31 Jan 2011
Total Posts: 1713
10 Sep 2013 04:00 PM
I shouldn't need to, I've defined item as a Value inside the tool which has the same value as the Tool's name. This should only store one tool, but it seems for every tool it seems to run the backpack function. Do localscripts run even when they're not equipped or something?
Report Abuse
funnymouse7 is not online. funnymouse7
Joined: 17 Mar 2011
Total Posts: 1741
10 Sep 2013 04:02 PM
Yes you can run a local script in the backpack even if its not equipped

atleast I think so as I mostly do something like that
Report Abuse
Saviorofdragons is not online. Saviorofdragons
Joined: 10 Jan 2013
Total Posts: 489
10 Sep 2013 04:03 PM
Any output? I may be able to fix it if there is output
Report Abuse
killajake25 is not online. killajake25
Joined: 31 Jan 2011
Total Posts: 1713
10 Sep 2013 04:04 PM
There's no output, for all the script knows it's running as it's meant to.

@Funny, I have to go for tonight, I'll try playing with that tomorrow and I'll get back to you what I do to try and fix that.
Report Abuse
08C is not online. 08C
Joined: 26 Jan 2013
Total Posts: 847
10 Sep 2013 04:34 PM
[ Content Deleted ]
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