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:lol60characters

Previous Thread :: Next Thread 
Dinobird is not online. Dinobird
Joined: 29 Apr 2009
Total Posts: 213
27 Nov 2012 06:26 PM
Tool = script.Parent
p = Tool.Parent.Parent
personalbuildings = (game.Workspace:FindFirstChild(p.Name .. "'s Structures"))

function onButton1Down(mouse)
if personalbuildings:FindFirstChild(CraftingBench) == nil then
model = game.Objects.Structures.CraftingBench:clone()
model.Parent = personalbuildings
model:MakeJoints()
model:MoveTo(mouse.hit.p)
elseif personalbuildings:FindFirstChild(CraftingBench) then
personalbuildings:FindFirstChild(CraftingBench):MoveTo(mouse.hit.p)
end
end

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

Tool.Selected:connect(onSelected)
Report Abuse
WishNite is not online. WishNite
Joined: 11 Feb 2009
Total Posts: 15828
27 Nov 2012 06:28 PM
personalbuildings does not exist when the script is run. I would suggest an if line to prevent this.
Report Abuse
Dinobird is not online. Dinobird
Joined: 29 Apr 2009
Total Posts: 213
27 Nov 2012 06:39 PM
But it does though? Let me just try it again...
Report Abuse
Dinobird is not online. Dinobird
Joined: 29 Apr 2009
Total Posts: 213
27 Nov 2012 06:41 PM
Nope, it exists when the script is run.
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