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: Creating a tool from another tool - Toolception!

Previous Thread :: Next Thread 
Distriction is not online. Distriction
Joined: 25 Mar 2012
Total Posts: 655
13 May 2012 12:00 PM
Output:
12:54:04 - Local is not a valid member of Model
12:54:04 - Script "Workspace.Player.DroneUnit.LocalScript", Line 10
12:54:04 - stack end
12:54:04 - Disconnected event because of exception


Script:
function onButton1Down(mouse)
playername = script.Parent.Parent.Name
player = game.Players:FindFirstChild(playername)
orb = Instance.new("Tool")
orb.Name = "Eyeball"
orb.Parent = player.Backpack
orb.TextureId = "http://www.roblox.com/asset/?id=69302218"
orb.CanBeDropped = false
lol = script.Parent.orbscripts
bob = lol.Local Gui:Clone()
bob.Parent = orb
hndl = Instance.new("Part")
hndl.Parent = orb
hndl.Locked = true
hndl.Name = "Handle"
doit = orb.Script:Clone()
doit.Disabled = true
doit.Parent = hndl
mash = Instance.new("Part")

lol.Disabled = false
wait(0.04)
script.Parent:Remove()
end





function onSelection(mouse)
mouse.Icon = "rbxasset://textures\\GunCursor.png"
mouse.Button1Down:connect(onButton1Down)
end




script.Parent.Equipped:connect(onSelection)




------------------------------------
When I click the button, I get the tool called "Eyeball" but no handle or no scripts inside the tool.

If you want to try the tool for yourself, here is the link:
http://www.roblox.com/Orb-Help-item?id=80773768
Report Abuse
malachi11 is not online. malachi11
Joined: 07 May 2008
Total Posts: 2420
13 May 2012 12:02 PM
bob = lol["Local Gui"]:Clone()
Report Abuse
Distriction is not online. Distriction
Joined: 25 Mar 2012
Total Posts: 655
13 May 2012 12:03 PM
What...?
Report Abuse
L2000 is not online. L2000
Joined: 03 Apr 2008
Total Posts: 77448
13 May 2012 12:07 PM
You can't have spaces in the names, or it will only search for the first part of the name, and give an error. To fix this, you need to have it in quotations, like what malachi said.


function onButton1Down(mouse)
playername = script.Parent.Parent.Name
player = game.Players:FindFirstChild(playername)
orb = Instance.new("Tool")
orb.Name = "Eyeball"
orb.Parent = player.Backpack
orb.TextureId = "http://www.roblox.com/asset/?id=69302218"
orb.CanBeDropped = false
lol = script.Parent.orbscripts
bob = lol["Local Gui"]:Clone()
bob.Parent = orb
hndl = Instance.new("Part")
hndl.Parent = orb
hndl.Locked = true
hndl.Name = "Handle"
doit = orb.Script:Clone()
doit.Disabled = true
doit.Parent = hndl
mash = Instance.new("Part")

lol.Disabled = false
wait(0.04)
script.Parent:Remove()
end





function onSelection(mouse)
mouse.Icon = "rbxasset://textures\\GunCursor.png"
mouse.Button1Down:connect(onButton1Down)
end




script.Parent.Equipped:connect(onSelection)
Report Abuse
Distriction is not online. Distriction
Joined: 25 Mar 2012
Total Posts: 655
13 May 2012 12:12 PM
@L2000,

Now I have the Tool, the handle and the localgui, not the script or mesh though o.O
Report Abuse
Distriction is not online. Distriction
Joined: 25 Mar 2012
Total Posts: 655
13 May 2012 12:13 PM
Oh, fail. I didn't finish my script before I posted it here. Lol! Soz.
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