|
| 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 |
|
|
|
| 07 Aug 2011 11:16 PM |
| I did the function wrong!I think. . .is it function()onTouched? |
|
|
| Report Abuse |
|
|
|
| 07 Aug 2011 11:21 PM |
| Please help,this is Scripting helpers for god sake! |
|
|
| Report Abuse |
|
|
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
|
  |
| 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
|
  |
| 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
|
  |
| 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 |
|
|
|
| 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 |
|
|