My explorer set up can be found here: http://tinypic.com/r/2hg4x7b/9
NOTE : I have a script that puts the whole screen gui into the players.
name = script.Parent.Nam.Value items = game.ServerStorage.Items print(name) script.Parent.MouseButton1Click:connect(function() local found = items:FindFirstChild(name) if found then print("works")--many attempts at this point but no solutions yet. I tried many like "that = that." or "clone.parent stuff" end end)
Hello. I'm practicing at the same time working on a game. What I did was that I inserted into one of the many frames so that you can click and it gives you an item like an inventory. So far I got a script to equip with q and a bunch of others like selection boxes. Now, I need to be able to take items out of the inventory and put into default roblox backpack. Thats what I am trying to do with this script. I'm trying to get the name value from a string value I put in one of the frames. That name value will determine what Item I get back. So if I want an item called gun the name value in the string value in the frame should match. So once the name value gets taken I want the script to look through a folder named items. In that folder is going to be my tools and stuff. I want the script to use the name value in the frame and use that to look for the same name in the items folder. IDK what I'm doing wrong in my script as i'm pretty stumped atm. Perhaps I'm making it harder for myself?
not sure if the variable Nam is spelled like that on purpose but I'm just going to keep it that way
by the way I converted your global variables into local variables meaning they can only be accessed from this script and no other so the values won't get mixed up from other players scripts and potentially create duping.
local name = script.Parent.Nam.Value -- adding local before a variables makes it not a global variable and it won't get mixed up between other scripts local items = game.ServerStorage.Items local player = game.Players.LocalPlayer print(name) script.Parent.MouseButton1Click:connect(function() local found = items:FindFirstChild(name) if found then local c = found:Clone() c.Parent = player.Backpack end end)