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
 

Lighting clone button! Help!

Previous Thread :: Next Thread 
stealthsniper200 is not online. stealthsniper200
Joined: 03 Jul 2010
Total Posts: 981
07 Aug 2011 11:15 PM
How do I make one?!Heres my idea of scripting one.

function(onTouched)

game.Workspace.Brick.onTouched:Clone.Lighting.Model

end

game.Workspace.Brick.onTouched:connect(Touched)


I only do basic scripting but I havent perfected that yet sadly.So will this work because I dont trust myself to try it. . .
Report Abuse
stealthsniper200 is not online. stealthsniper200
Joined: 03 Jul 2010
Total Posts: 981
07 Aug 2011 11:16 PM
I did the function wrong!I think. . .is it function()onTouched?
Report Abuse
stealthsniper200 is not online. stealthsniper200
Joined: 03 Jul 2010
Total Posts: 981
07 Aug 2011 11:21 PM
Please help,this is Scripting helpers for god sake!
Report Abuse
tummey2 is not online. tummey2
Joined: 04 Feb 2009
Total Posts: 1802
07 Aug 2011 11:25 PM
HelloKitty = YourModel
model = Lighting.HelloKitty
backup = model:clone()


function regenerate()
game.Workspace.HelloKitty:Remove()
model = backup:clone()
model.Parent = game.Workspace
model:makeJoints()
script.Parent.BrickColor = BrickColor.new(26)
wait(5)
script.Parent.BrickColor = BrickColor.new(104)
end

function onTouched(hit)
if (hit.Parent:FindFirstChild("Humanoid") ~= nil) then
regenerate()
end
end

script.Parent.Touched:connect(onTouched)

Think that should work
Report Abuse
nate890 is not online. nate890
Joined: 22 Nov 2008
Total Posts: 21686
07 Aug 2011 11:25 PM
What are you trying to do? Clone game.Lighting?

You can insert lighting like:

_Lighting=Instance.new("Lighting",game.Workspace)

Or if you want to close in

script.Parent.Touched:connect(function(hit)
_Lighting=game.Lighting:clone()
_Lighting.Parent=game.Workspace
end)
Report Abuse
tofwap is not online. tofwap
Joined: 06 Dec 2007
Total Posts: 6596
07 Aug 2011 11:27 PM
K so there are some major problems here

You tried to set up an event inside of a function that would create a redundant loop
you did not include the parenthesis for the clone function, and
you did not assign the parent of the clone.
Here is your corrected version"

function(onTouched)--correct
game.Lighting.model:Clone().Parent=Workspace
end
game.Workspace.Brick.onTouched:connect(Touched)

| success is no reason to quit |
Report Abuse
tummey2 is not online. tummey2
Joined: 04 Feb 2009
Total Posts: 1802
07 Aug 2011 11:28 PM
Oh yeah i read that wrong. Are you trying to add a brick to lighting or the other way around?

Or what nate said?
Report Abuse
stealthsniper200 is not online. stealthsniper200
Joined: 03 Jul 2010
Total Posts: 981
07 Aug 2011 11:31 PM
Like a clone from lighting map script except activated through a touched brick or button.Anyways thank you!
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