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: Place a Beach Chair Tool

Previous Thread :: Next Thread 
wickedXxxxlegoxxxx is not online. wickedXxxxlegoxxxx
Joined: 10 May 2011
Total Posts: 952
27 Dec 2012 03:24 PM
Hi...

I'm trying to make a tool that on clicked, places a chair, deletes the tool, and deletes the chair the person placed last time.

I do not know how to use the onclick function. Can anyone show me how the onclick function works?

Thanks ahead!

~wickedXxxxlegoxxxx
Report Abuse
goalzero is not online. goalzero
Joined: 29 Sep 2010
Total Posts: 132
27 Dec 2012 03:28 PM
Sounds cool!
That a figure insert.
Let me see...
Report Abuse
FreeToTake is not online. FreeToTake
Joined: 21 Apr 2010
Total Posts: 1827
27 Dec 2012 03:37 PM
local chair = game.Lighting.Chair:Clone()
local x = false

script.Parent.Selected:connect(function(m)
m.Button1Down:connect(function()
if not x then
chair.Parent = workspace
else
chair.Parent = nil
end
x = not x
end)
end)
Report Abuse
FreeToTake is not online. FreeToTake
Joined: 21 Apr 2010
Total Posts: 1827
27 Dec 2012 03:38 PM
woops sorry

local chair = game.Lighting.Chair:Clone()
local x = false

script.Parent.Selected:connect(function(m)
m.Button1Down:connect(function()
if not x then
chair.Parent = workspace
chair:MoveTo(m.Hit.p + Vector3.new(0, 3, 0))
else
chair.Parent = nil
end
x = not x
end)
end)
Report Abuse
wickedXxxxlegoxxxx is not online. wickedXxxxlegoxxxx
Joined: 10 May 2011
Total Posts: 952
27 Dec 2012 04:11 PM
That didn't work. The model named Chair is in Lighting, I made a tool and inserted the script into the tool and put the tool in Starerpack.
Report Abuse
wickedXxxxlegoxxxx is not online. wickedXxxxlegoxxxx
Joined: 10 May 2011
Total Posts: 952
27 Dec 2012 04:25 PM
Starterpack*
Report Abuse
goalzero is not online. goalzero
Joined: 29 Sep 2010
Total Posts: 132
27 Dec 2012 04:32 PM
I think ive got something
Report Abuse
awas3 is not online. awas3
Joined: 24 Oct 2010
Total Posts: 2854
27 Dec 2012 04:52 PM
Put it in a hopperbin not tool...
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