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: Lighting to Workspace (Need help)

Previous Thread :: Next Thread 
isaacfrye is not online. isaacfrye
Joined: 12 Jul 2008
Total Posts: 230
26 Dec 2012 07:47 PM
Hello, I am working on a game, but there is
somewhere in it that I need a button, this button will simply copy a model from Lighting to workspace, but I need it to be free, and not require a money leaderboard. (if you do not know how to do it without a leaderboard just do it with one, that's okay.) I need it to be clickable by anybody, and can be clicked as much as people want, but also have a countdown between clicks. (Count down Not required if you don't know how)
I also want the model that comes into Workspace to vanish after a while, but I can probably figure that one out on my own.

Anyway, I don't know if anybody here will be interested in helping, but if you are, I would appreciate it, I already have the model I want to appear, so you could just test the button with a brick, or something simple. Anyway, I would totally appreciate any help! I'd offer Robux to the first one to help, but sadly I'm low on Robux at the time. :( Thanks for reading. :)
Report Abuse
Usering is not online. Usering
Joined: 18 Aug 2012
Total Posts: 10281
26 Dec 2012 07:53 PM
Script inside of a TextButton

model = game.Lighting.MODELNAME:Clone()
waittime = 60 --1 minute

script.Parent.MouseButton1Click:connect(function()
model.Parent = workspace
model:MakeJoints()
wait(waittime)
model:Destroy()
end)
Report Abuse
isaacfrye is not online. isaacfrye
Joined: 12 Jul 2008
Total Posts: 230
26 Dec 2012 07:56 PM
Thanks, I'll try that out. althought I want it to be ontouch instead of clicking, I can try to change it on my own though. :)
Report Abuse
notsopwnedg is not online. notsopwnedg
Joined: 07 Nov 2010
Total Posts: 4182
26 Dec 2012 07:57 PM
this would just clone the model with a delay/Debounce...

Brick
>ClickDetector
>Script

Script:

local model = game.Lighting.MODEL_NAME
local CD = script.Parent.ClickDetector
local d = true
local DELAY = 5
CD.Clicked:connect(function()
if d == true then
d = false
local clone = model:Clone()
clone.Parent = workspace
wait(DELAY)
d = true
end
end)
Report Abuse
notsopwnedg is not online. notsopwnedg
Joined: 07 Nov 2010
Total Posts: 4182
26 Dec 2012 07:58 PM
You said "I need it to be clickable"


:/
Report Abuse
shipmaster4000 is not online. shipmaster4000
Joined: 29 Apr 2010
Total Posts: 2050
26 Dec 2012 08:06 PM
MouseButton1Down is for guis. Isnt this a block?
Report Abuse
SamuelKingx is not online. SamuelKingx
Joined: 27 Jan 2012
Total Posts: 3472
26 Dec 2012 08:16 PM
He made it sound as if it were a GUI..
This kind of information would really help.

~SamuelKingx~LuaLearners Teacher(+2)
Report Abuse
isaacfrye is not online. isaacfrye
Joined: 12 Jul 2008
Total Posts: 230
26 Dec 2012 10:09 PM
Sorry, I wanted it to be a step-on button, sorry for not specifying.
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