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
 

Attempt to call global 'fire' (a nil value)

Previous Thread :: Next Thread 
smiley599 is not online. 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 is not online. 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 is not online. smiley599
Joined: 23 Jan 2010
Total Posts: 21869
09 Feb 2013 01:36 PM
Bump
Report Abuse
Azarth is not online. 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 is not online. 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 is not online. 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 is not online. 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 is not online. smiley599
Joined: 23 Jan 2010
Total Posts: 21869
09 Feb 2013 03:00 PM
not working,...
Report Abuse
smiley599 is not online. 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 is not online. 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 is not online. 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 is not online. 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
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