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
 

Re: What do you do if this happens!? (DOESN'T MAKE SENSE!)

Previous Thread :: Next Thread 
FoggedOut is not online. FoggedOut
Joined: 09 Dec 2011
Total Posts: 3021
23 Sep 2013 09:29 PM
19:28:25.671 - attempt to call a nil value
19:28:25.674 - Disconnected event because of exception

How am I supposed to know what the nil is? It doesn't say what line, or why. qq Why is this?
Report Abuse
JoshuaKempfert is not online. JoshuaKempfert
Joined: 16 Feb 2013
Total Posts: 2407
23 Sep 2013 09:31 PM
Output please. Just kidding
Report Abuse
XAXA is not online. XAXA
Joined: 10 Aug 2008
Total Posts: 6315
23 Sep 2013 09:31 PM
Is that the only output?
Report Abuse
jonesj627 is not online. jonesj627
Joined: 06 Oct 2010
Total Posts: 1496
23 Sep 2013 09:32 PM
could you paste the script?
Report Abuse
FoggedOut is not online. FoggedOut
Joined: 09 Dec 2011
Total Posts: 3021
23 Sep 2013 09:32 PM
Its the only output, and that's what confuses me.

@1st Post, Nice troll c:
Report Abuse
madness725 is not online. madness725
Joined: 19 Apr 2011
Total Posts: 2058
23 Sep 2013 09:32 PM
nil is when something doesnt exist, A nil value would be a value that doesnt exist
Report Abuse
FoggedOut is not online. FoggedOut
Joined: 09 Dec 2011
Total Posts: 3021
23 Sep 2013 09:33 PM
Here is the script. Fix any problems if you see them, but all I can say is that the keydown gives that, and so do the UnEquip and Equip functions:


print("FI-YAAAA is in!! c:")
local Tool = script.Parent
camera = game.Workspace.CurrentCamera

-- Fire... ya, thats it
local fire = Instance.new("Part")
fire.Transparency = 1
fire.CanCollide = false
fire.Anchored = true
fire.Size = Vector3.new(1,1,1)

local fireParticles = Instance.new("Fire")
fireParticles.Parent = fire
fireParticles.Color = Color3.new(1,117/255,57/255)

local script = Tool.BurnScript:clone()
script.Parent = fire

--[[ --------------------------------------------------------------------------------------------------------------
CODING TIME!
-------------------------------------------------------------------------------------------------------------- ]]--

-- Equip and UnEquip st00f.... may need. :o
local function OnEquipped(mouse)
print("HI BOI")
mouse.KeyDown:connect(OnKeyDown)
wait(0.001)
local h = Tool.Parent:FindFirstChild("Humanoid")
local head = Tool.Parent:FindFirstChild("Head")
local m = head:FindFirstChild("Mesh")
local torso = Tool.Parent:FindFirstChild("Torso")
local player = Tool.Parent

-- The (m)HP+W; VERY IMPORTANT DUDE
local oldHP = h.Health
local oldMHP = h.MaxHealth
local oldW = h.WalkSpeed
end

local function OnUnequipped()
print("BAI BOI")
end

-- KeyDown
local function OnKeyDown(key)
key = string.lower(key)
if key == 'e' then
h.Health = 1000000000000
h.MaxHealth = 1000000000000
h.WalkSpeed = 0
wait(0.1)
Tool.FireSpellAni.Disabled = false
camera.CameraSubject = nil
camera.CameraType = "Scriptable"
camera:SetRoll(Tool.MapData["1"].Roll.Value)
camera.CoordinateFrame = Tool.MapData["1"].c1.Value
camera.Focus = Tool.MapData["1"].f1.Value
camera.FieldOfView = Tool.MapData["1"].FOV.Value
wait(2)
Ring(torso.Position)
camera.CameraSubject = h
camera.CameraType = "Custom"
camera.FieldOfView = 70
wait(2)
h.Health = oldHP
h.MaxHealth = oldMHP
h.WalkSpeed = oldW
end
end

-- Here, lets having fire functions :3
function Ring(v)
local numOfFire = 16
local increment = (math.pi *2)/numOfFire

torsoNormal = torso.CFrame.lookVector
denom = math.abs(torsoNormal.x) + math.abs(torsoNormal.z)
posX = 15 * (torsoNormal.x/denom)
posZ = 15 * (torsoNormal.z/denom)

local pos = Vector3.new(v.x + posX,v.y, v.z + posZ)
for i = 1, numOfFire do

local fiery = fire:clone()
fiery.Fire.Heat = 20
fiery.Fire.Size = 10
fiery.Size = Vector3.new(5,fiery.Size.y + 7,fiery.Size.z)
fiery.Position = pos
fiery.Parent = game.Workspace
fiery.BurnScript.Disabled = false
debris:AddItem(fiery,8)

local angle = increment * i
pos = Vector3.new(((pos.x - v.x) * math.cos(angle)) - ((pos.z - v.z) * math.sin(angle)) + v.x, pos.y,((pos.x - v.x) * math.sin(angle)) + ((pos.z - v.z) * math.cos(angle)) + v.z)

end
end



-- Ok, so this is the nutshell -.-
Tool.Equipped:connect(OnEquipped)
Tool.Unequipped:connect(OnUnequipped)
Report Abuse
madness725 is not online. madness725
Joined: 19 Apr 2011
Total Posts: 2058
23 Sep 2013 09:34 PM
Who could you have made this script, You didnt know what nil means, But you put nil in the script?
Report Abuse
FoggedOut is not online. FoggedOut
Joined: 09 Dec 2011
Total Posts: 3021
23 Sep 2013 09:36 PM
@Mad, if you actually read what I said, I asked where it could be. -.- I know what nil is, and I've used it 100++++++ times (Just a horrible example... should of said 1k)

I just don't know where, is all I'm asking, is the problem.
Report Abuse
XAXA is not online. XAXA
Joined: 10 Aug 2008
Total Posts: 6315
23 Sep 2013 09:37 PM
>local script = Tool.BurnScript:clone()

Is BurnScript in the tool at all?
Report Abuse
FoggedOut is not online. FoggedOut
Joined: 09 Dec 2011
Total Posts: 3021
23 Sep 2013 09:40 PM
@XAXA, yes.
Report Abuse
FoggedOut is not online. FoggedOut
Joined: 09 Dec 2011
Total Posts: 3021
23 Sep 2013 10:30 PM
Bump
Report Abuse
ScrewDeath is not online. ScrewDeath
Joined: 03 Jun 2012
Total Posts: 2700
23 Sep 2013 10:37 PM
I'd just spam prints... see where they stop.
Report Abuse
janthran is not online. janthran
Joined: 15 May 2009
Total Posts: 17429
23 Sep 2013 10:41 PM
ouch dude
you can NOT set script as a variable
Report Abuse
janthran is not online. janthran
Joined: 15 May 2009
Total Posts: 17429
23 Sep 2013 10:42 PM
I mean really
script is global- you can't change it
it always means the script that you're typing in
change the "script" variable to something else
Report Abuse
ScrewDeath is not online. ScrewDeath
Joined: 03 Jun 2012
Total Posts: 2700
23 Sep 2013 11:15 PM
^omg how did you notice that little detail q-q

-droops head
Report Abuse
janthran is not online. janthran
Joined: 15 May 2009
Total Posts: 17429
23 Sep 2013 11:41 PM
@screw
i m gud scriptr


or maybe it's just logical
the error says he tried to reference a nil value
so the problem has to be the declarations
so i looked at the declarations and done
Report Abuse
FoggedOut is not online. FoggedOut
Joined: 09 Dec 2011
Total Posts: 3021
24 Sep 2013 09:59 PM
@Jan, nice noticing that. After posting I saw that and realized how derp that was. It still is broken and does the same error, but very nice see. I would have never found that if this wasn't mine. xD
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