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: Question about this error

Previous Thread :: Next Thread 
18cwatford is not online. 18cwatford
Joined: 08 Oct 2009
Total Posts: 5410
26 Jan 2012 08:52 PM
19:50:20 - attempt to call a nil value
19:50:20 - Disconnected event because of exception

WHERE DID IT ERROR T.T

-{ 3rd Year as 18cwatford, may as well be OnlyChild when I can -_- }-
Report Abuse
litozinnamon is online. litozinnamon
Joined: 21 Dec 2009
Total Posts: 891
26 Jan 2012 08:56 PM
You are trying to index something that doesn't exist

Do you have the whole script?
Report Abuse
18cwatford is not online. 18cwatford
Joined: 08 Oct 2009
Total Posts: 5410
26 Jan 2012 08:57 PM
Obv not.

-{ 3rd Year as 18cwatford, may as well be OnlyChild when I can -_- }-
Report Abuse
18cwatford is not online. 18cwatford
Joined: 08 Oct 2009
Total Posts: 5410
26 Jan 2012 08:59 PM
Order I have stuff in:
|StarterGui
|-|ScreenGui
|-|-|Frame
|-|-|-|TextButton
|-|-|-|-|Script
|-|-|This Works :P -- A Frame.

Script:
open = false
position = 0.1

function onClicked(mouse)
if open == false then
for _,v in piars(script.Parent.Parent.Parent:getChildren()) do
if v:IsA("Frame") then
if v.Name ~= script.Parent.Parent.Name then
l = Instance.new("TextButton", script.Parent.Parent)
l.Position = UDim2.new(0.4, 0, position, 0)
position = position + position -- Inseption? Lolol
l.Size = script.Parent.Size
l.Name = v
l.Text = v
l.BackgroundColor3 = Color3.new(28/255, 28/255, 28/255)
l.BorderSizePixel = 0
end
end
end
open = true
elseif open == true then
for _,v in paris(script.Parent.Parent:getChildren()) do
if v ~= script.Parent then
if v:IsA("TextButton") then
v:Destroy()
position = 0.1
end
end
end
open = false
end
end

script.Parent.MouseButton1Down:connect(onClick)

You tell me whats nil.

-{ 3rd Year as 18cwatford, may as well be OnlyChild when I can -_- }-
Report Abuse
18cwatford is not online. 18cwatford
Joined: 08 Oct 2009
Total Posts: 5410
26 Jan 2012 09:04 PM
What, nobody likes scripting helpers anymore D:
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
26 Jan 2012 09:05 PM
Did it say what was nil? And "position = position + position -- Inseption? Lolol" o.o

† KMXD †
Report Abuse
18cwatford is not online. 18cwatford
Joined: 08 Oct 2009
Total Posts: 5410
26 Jan 2012 09:07 PM
It didnt say ANYTHING was nil T.T if it did, why would I post?
"position = position + position" that just adds it to itself, just multiplying cause i want it that way XD
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
26 Jan 2012 09:08 PM
Try in pairs.

† KMXD †
Report Abuse
18cwatford is not online. 18cwatford
Joined: 08 Oct 2009
Total Posts: 5410
26 Jan 2012 09:13 PM
open = false
position = 0.1

function onClicked(mouse)
if open == false then
for _,v in piars(script.Parent.Parent.Parent:getChildren()) do
if v:IsA("Frame") then
if v.Name ~= script.Parent.Parent.Name then
l = Instance.new("TextButton", script.Parent.Parent)
l.Position = UDim2.new(0.4, 0, position, 0)
position = position + 0.1 -- Inseption? Lolol
l.Size = script.Parent.Size
l.Name = v
l.Text = v
l.BackgroundColor3 = Color3.new(28/255, 28/255, 28/255)
l.BorderSizePixel = 0
end
end
end
open = true
elseif open == true then
for _,v in paris(script.Parent.Parent:getChildren()) do
if v ~= script.Parent then
if v:IsA("TextButton") then
v:Destroy()
position = 0.1
end
end
end
open = false
end
end

script.Parent.MouseButton1Down:connect(onClick)

-- Knight wanted it...
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
26 Jan 2012 09:14 PM
In pairs man, in pairs.

† KMXD †
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