GUESTHAXX
|
  |
| Joined: 16 Apr 2012 |
| Total Posts: 3370 |
|
|
| 18 Aug 2012 11:15 PM |
So I'm trying to make a object spawn from Lighting.
This object is a model. Model name is "Cloud".
Here's what I have made so far:
debounce = true function activate(hit) if debounce == false then return end debounce = false script.Parent.Anchored = true wait(0.05) game.Lighting.Cloud:Clone().Parent = game.Workspace something.position.something -- Something that will make the "cloud" spawn over where the brick that is named "NukeHead". end
|
|
|
| Report Abuse |
|
|
|
| 18 Aug 2012 11:19 PM |
| Place the "cloud" where you want it, then put it in lighting. When it comes out of lighting it'll be there. |
|
|
| Report Abuse |
|
|
GUESTHAXX
|
  |
| Joined: 16 Apr 2012 |
| Total Posts: 3370 |
|
|
| 18 Aug 2012 11:26 PM |
I don't want that.... It's a custom object that I need to be able to spawn anywhere the "NukeHead" drops.
I know it goes where position is... I'm just missing something there... |
|
|
| Report Abuse |
|
|
| |
|
|
| 18 Aug 2012 11:34 PM |
How about Cloning it to workspace, and then use the :MoveTo() method.
and in the parenthesis, put the location of the Nukehead. That will make the cloud spawn over the nukehead.
Also, :MoveTo() can be used ONLY on models. |
|
|
| Report Abuse |
|
|
GUESTHAXX
|
  |
| Joined: 16 Apr 2012 |
| Total Posts: 3370 |
|
|
| 18 Aug 2012 11:41 PM |
Before I add the :MoveTo(), would this work:
debounce = true function activate(hit) if debounce == false then return end debounce = false script.Parent.Anchored = true wait(0.05) game.Lighting.Cloud:Clone().Parent = game.Workspace Position = script.Parent.Position end
I got the "Position = script.Parent.Position" from a old script of mind that would spawn an explosion where the brick was. |
|
|
| Report Abuse |
|
|
mamaguy
|
  |
| Joined: 07 Oct 2010 |
| Total Posts: 7073 |
|
|
| 18 Aug 2012 11:45 PM |
Yea, that would work, except you'd have a random cloud in workspace You could try: debounce = true function activate(hit) if debounce == false then return end debounce = false script.Parent.Anchored = true wait(0.05) cloud = game.Lighting.Cloud:Clone() cloud.Parent = workspace cloud.CFrame = script.Parent.CFrame end |
|
|
| Report Abuse |
|
|
GUESTHAXX
|
  |
| Joined: 16 Apr 2012 |
| Total Posts: 3370 |
|
|
| 18 Aug 2012 11:55 PM |
I tried both. None of them worked.
Output doesn't have a error msg. |
|
|
| Report Abuse |
|
|
mamaguy
|
  |
| Joined: 07 Oct 2010 |
| Total Posts: 7073 |
|
|
| 19 Aug 2012 12:01 AM |
Can you post the full script? If it's the full script then the problem is you didn't call the function/have an event tied to it. |
|
|
| Report Abuse |
|
|
GUESTHAXX
|
  |
| Joined: 16 Apr 2012 |
| Total Posts: 3370 |
|
|
| 19 Aug 2012 12:02 AM |
| I did post the full script. |
|
|
| Report Abuse |
|
|
mamaguy
|
  |
| Joined: 07 Oct 2010 |
| Total Posts: 7073 |
|
|
| 19 Aug 2012 12:03 AM |
@Guest, Then the problem is you never called the function/tied an event to it. |
|
|
| Report Abuse |
|
|
GUESTHAXX
|
  |
| Joined: 16 Apr 2012 |
| Total Posts: 3370 |
|
|
| 19 Aug 2012 12:08 AM |
Say what?
Oh. if you mean post the whole script as in my old one:
debounce = true function activate(hit) if debounce == false then return end debounce = false script.Parent.Anchored = true wait(0.05) game.Lighting.Cloud:Clone().Parent = game.Workspace Boom2 = Instance.new("Explosion") Boom2.BlastRadius = 40 Boom2.Parent = game.Workspace Boom2.Position = script.Parent.Position wait(0.5) Boom2:Remove()
Worked as of 3 months ago... You might remember this thread:
http://www.roblox.com/Forum/ShowPost.aspx?PostID=68926138
Pretty much, I'm trying to redo that. But now because I know more of scripting, I'm able to do more then ask. |
|
|
| Report Abuse |
|
|
mamaguy
|
  |
| Joined: 07 Oct 2010 |
| Total Posts: 7073 |
|
|
| 19 Aug 2012 12:10 AM |
@Guest, Don't remember that, 3 months ago 1/4 of a year qq But I mean like, For it to work you would need to change function activate(hit) to NukeHead.Touched:connect(function(hit) or you would add an event NukeHead.Touched:connect(activate) |
|
|
| Report Abuse |
|
|
GUESTHAXX
|
  |
| Joined: 16 Apr 2012 |
| Total Posts: 3370 |
|
|
| 19 Aug 2012 12:34 AM |
debounce = true function activate(hit) if debounce == false then return end debounce = false script.Parent.Anchored = true wait(0.05) game.Lighting.Cloud:Clone().Parent = game.Workspace Boom2 = Instance.new("Explosion") Boom2.BlastRadius = 40 Boom2.Parent = game.Workspace Boom2.Position = script.Parent.Position wait(0.5) Boom2:Remove() NukeHead.Touched:connect(function(hit)
|
|
|
| Report Abuse |
|
|
GUESTHAXX
|
  |
| Joined: 16 Apr 2012 |
| Total Posts: 3370 |
|
|
| 19 Aug 2012 12:35 AM |
| Just get eof error message in the output. |
|
|
| Report Abuse |
|
|
ShoeBox4
|
  |
| Joined: 06 Apr 2011 |
| Total Posts: 890 |
|
|
| 19 Aug 2012 12:37 AM |
Forgot the end for your function, silly!
debounce = true function activate(hit) if debounce == false then return end debounce = false script.Parent.Anchored = true wait(0.05) game.Lighting.Cloud:Clone().Parent = game.Workspace Boom2 = Instance.new("Explosion") Boom2.BlastRadius = 40 Boom2.Parent = game.Workspace Boom2.Position = script.Parent.Position wait(0.5) Boom2:Remove() end NukeHead.Touched:connect(function(hit) |
|
|
| Report Abuse |
|
|
GUESTHAXX
|
  |
| Joined: 16 Apr 2012 |
| Total Posts: 3370 |
|
|
| 19 Aug 2012 12:02 PM |
Nothing :/
I tried this:
debounce = true function activate(hit) if debounce == false then return end debounce = false script.Parent.Anchored = true
wait(0.05)
Boom2 = Instance.new("Explosion") Boom2.BlastRadius = 40 Boom2.Parent = game.Workspace Boom2.Position = script.Parent.Position
Boom3 = game.Lighting.Cloud:Clone().Parent = game.Workspace Boom3.Parent = game.Workspace Boom3.Position = script.Parent.Position
wait(0.5)
Boom3:Remove() end NukeHead.Touched:connect(function(hit)
But I get this error message.
Workspace.NukeHead.Script:14: unexpected symbol near '='
|
|
|
| Report Abuse |
|
|
GUESTHAXX
|
  |
| Joined: 16 Apr 2012 |
| Total Posts: 3370 |
|
| |
|
|
| 19 Aug 2012 01:08 PM |
| Why are you setting the parent of Boom3 twice? |
|
|
| Report Abuse |
|
|
GUESTHAXX
|
  |
| Joined: 16 Apr 2012 |
| Total Posts: 3370 |
|
|
| 19 Aug 2012 01:26 PM |
| Cause I want the model to spawn over the brick that has this script in it. |
|
|
| Report Abuse |
|
|
|
| 19 Aug 2012 03:58 PM |
"Boom3 = game.Lighting.Cloud:Clone().Parent = game.Workspace Boom3.Parent = game.Workspace"
I fail to see how that manipulates the position?
~Death to lazy builders. Remove the CFrame tools. Command bar all the way. -pauljkl |
|
|
| Report Abuse |
|
|
GUESTHAXX
|
  |
| Joined: 16 Apr 2012 |
| Total Posts: 3370 |
|
|
| 20 Aug 2012 08:32 AM |
Oh. I just now saw that error.
Is "saw" the right word? |
|
|
| Report Abuse |
|
|
codsterr
|
  |
| Joined: 27 Sep 2008 |
| Total Posts: 1983 |
|
|
| 20 Aug 2012 08:44 AM |
| Did you remember cloud:MakeJoints() |
|
|
| Report Abuse |
|
|
GUESTHAXX
|
  |
| Joined: 16 Apr 2012 |
| Total Posts: 3370 |
|
|
| 20 Aug 2012 09:08 AM |
| Don't need to. All the parts in cloud are anchored. |
|
|
| Report Abuse |
|
|
|
| 20 Aug 2012 09:16 AM |
debounce = true function activate(hit) if debounce == false then return end debounce = false script.Parent.Anchored = true
wait(0.05)
local Boom2 = Instance.new("Explosion") Boom2.BlastRadius = 40 Boom2.Parent = game.Workspace Boom2.Position = script.Parent.Position
local Boom3 = game.Lighting.Cloud:Clone() Boom3.Parent = game.Workspace Boom3.Position = script.Parent.Position
wait(0.5)
Boom3:Remove() end
NukeHead.Touched:connect(activate) |
|
|
| Report Abuse |
|
|