smiley599
|
  |
| Joined: 23 Jan 2010 |
| Total Posts: 21869 |
|
|
| 09 Feb 2013 12:58 PM |
What does
attempt to call global 'fire' (a nil value)
mean?
Thanks :) |
|
|
| Report Abuse |
|
|
smiley599
|
  |
| Joined: 23 Jan 2010 |
| Total Posts: 21869 |
|
|
| 09 Feb 2013 12:59 PM |
This is the script:
function ot() fire() local brick = Instance.new("Part") brick.Anchored = false brick.Size = Vector3.new(1,1,1) brick.Name = "BasicBrick" brick.BrickColor = BrickColor.new("Really black") brick.Position =script.Parent.Parent.Parent.Drop.Position brick.Parent = script.Parent end
ot() |
|
|
| Report Abuse |
|
|
smiley599
|
  |
| Joined: 23 Jan 2010 |
| Total Posts: 21869 |
|
| |
|
Azarth
|
  |
| Joined: 17 Aug 2012 |
| Total Posts: 2760 |
|
|
| 09 Feb 2013 01:44 PM |
fire()
You don't have a function called fire. |
|
|
| Report Abuse |
|
|
smiley599
|
  |
| Joined: 23 Jan 2010 |
| Total Posts: 21869 |
|
|
| 09 Feb 2013 01:55 PM |
Do I need it to be
function ot() function fire()
? |
|
|
| Report Abuse |
|
|
sammy1229
|
  |
| Joined: 05 Aug 2010 |
| Total Posts: 669 |
|
|
| 09 Feb 2013 02:03 PM |
Create a seperate function called fire()
Put whatever you want into fire()
And then when you call fire() it'll do the stuff in fire.
Welcome to modular programming
|
|
|
| Report Abuse |
|
|
smiley599
|
  |
| Joined: 23 Jan 2010 |
| Total Posts: 21869 |
|
|
| 09 Feb 2013 02:10 PM |
| Thanks! I should have known; it started off as that with a while true do! Thanks! Ill try it out now! |
|
|
| Report Abuse |
|
|
smiley599
|
  |
| Joined: 23 Jan 2010 |
| Total Posts: 21869 |
|
| |
|
smiley599
|
  |
| Joined: 23 Jan 2010 |
| Total Posts: 21869 |
|
|
| 09 Feb 2013 03:12 PM |
function ot() fire() end
function fire() local brick = Instance.new("Part") brick.Anchored = false brick.Size = Vector3.new(1,1,1) brick.Name = "BasicBrick" brick.BrickColor = BrickColor.new("Really black") brick.Position = script.Parent.Parent.Parent.Drop.Position brick.Parent = script.Parent end
ot()
is this right? its not workking |
|
|
| Report Abuse |
|
|
smiley599
|
  |
| Joined: 23 Jan 2010 |
| Total Posts: 21869 |
|
|
| 09 Feb 2013 03:17 PM |
if it means anything, a part is created once without being touched...
function ot() fire() end
function fire() local brick = Instance.new("Part") brick.Anchored = false brick.Size = Vector3.new(1,1,1) brick.Name = "BasicBrick" brick.BrickColor = BrickColor.new("Really black") brick.Position = script.Parent.Parent.Parent.Drop.Position brick.Parent = script.Parent end
ot()
any ideas? |
|
|
| Report Abuse |
|
|
sammy1229
|
  |
| Joined: 05 Aug 2010 |
| Total Posts: 669 |
|
|
| 10 Feb 2013 04:33 PM |
function ot() fire() end
function fire() local brick = Instance.new("Part", Workspace) brick.Anchored = false brick.Size = Vector3.new(1, 1, 1) -- This is either Vector3 or CFrame, I forget which :P brick.Name = "BasicBrick" brick.BrickColor = BrickColor.new("Really black") brick.Position = script.Parent.Parent.Parent.Drop.Position brick.Parent = script.Parent end
ot() |
|
|
| Report Abuse |
|
|
smiley599
|
  |
| Joined: 23 Jan 2010 |
| Total Posts: 21869 |
|
|
| 10 Feb 2013 04:58 PM |
| What did you change then, sammy? It looks the same to me... |
|
|
| Report Abuse |
|
|