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: Help with a script!

Previous Thread :: Next Thread 
FreddieN is not online. FreddieN
Joined: 06 Jan 2014
Total Posts: 261
02 Jun 2014 02:01 PM



script.Parent.Parent.Parent.Parent.Parent.leaderstats.JAI.Value = script.Parent.Parent.Parent.Parent.Parent.leaderstats.JAI.Value - 1
local Time34 = script.Parent.Parent.Parent.Time3.Value
script.Parent.Parent.Time.Text = (Time34)
function fade ()

for transparency = 1, 0, -.1 do
script.Parent.Parent.Time.Transparency = transparency
wait(.1)

end
end
function fade2 ()

for transparency = 1, 0, .1 do
script.Parent.Parent.Parent.Info.Transparency = transparency
wait(.1)

end
end
fade()

if script.Parent.Parent.Parent.Parent.Parent.leaderstats.JAI.Value == 0 then


local game = script.Parent.Parent.Parent.Parent
script.Parent.Parent.Parent.Info.Visible = true


wait(4.5)



fade2()
game:ClearAllChildren()
else

end


repeat wait() until script.Parent.MouseEnter:connect(function(x,y)

local Stage = script.Parent.Parent.Parent.Parent.Parent.leaderstats.Stage.Value
script.Parent.Parent.Visible = false
misc = script.Parent.Parent.Parent
script.Parent.Parent.Time.Text = 0
local curlevel = misc.Parent.Game[Stage]
local level = misc.Parent.Game[Stage]:GetChildren()

--
misc.Quit.Visible = false
misc.Quit.Sure_quit.Visible = false
--

end)

for i=1,#level do
level[i].Visible = false
misc.black.Transparency = 1
misc.youfailed.Visible = false
misc.black.Visible = false
local win = curlevel.Scriptframe.Value.Value
curlevel.Scriptframe.Script.Disabled = false
curlevel.Parent[win].Script.Disabled = false
curlevel.Parent[win].Visible = true
misc.Time3.Value = 0
misc.End.Value = false
misc.Start.Value = true
local level2 = misc.Parent.Game[Stage]:GetChildren()

end


for i = 1,#level2 do

level[i].Visible = true

script.Parent.Script.Disabled = true
end


OUTPUT:

20:52:54.404 - Players.Player1.PlayerGui.Misc.Failed.touch.Script:56: attempt to get length of global 'level' (a nil value)
20:52:54.406 - Stack Begin
20:52:54.407 - Script 'Players.Player1.PlayerGui.Misc.Failed.touch.Script', Line 56
20:52:54.408 - Stack End
Report Abuse
FreddieN is not online. FreddieN
Joined: 06 Jan 2014
Total Posts: 261
02 Jun 2014 02:02 PM
What's wrong?
Report Abuse
FreddieN is not online. FreddieN
Joined: 06 Jan 2014
Total Posts: 261
03 Jun 2014 01:17 PM
Plese can somebody help me!

BUMP
Report Abuse
vlekje513 is not online. vlekje513
Joined: 28 Dec 2010
Total Posts: 9057
03 Jun 2014 01:19 PM
level variable is nil
Report Abuse
FreddieN is not online. FreddieN
Joined: 06 Jan 2014
Total Posts: 261
03 Jun 2014 01:21 PM
And how can i fix that?
Report Abuse
FreddieN is not online. FreddieN
Joined: 06 Jan 2014
Total Posts: 261
04 Jun 2014 02:14 AM
Bump, please!
Report Abuse
FreddieN is not online. FreddieN
Joined: 06 Jan 2014
Total Posts: 261
04 Jun 2014 02:38 AM
BUMP
can nobody fix this?
Report Abuse
FreddieN is not online. FreddieN
Joined: 06 Jan 2014
Total Posts: 261
04 Jun 2014 02:58 AM
BUMP, BUMP and BUMP!
Report Abuse
Jpoppycat is not online. Jpoppycat
Joined: 28 Aug 2011
Total Posts: 351
04 Jun 2014 03:05 AM
Have a look at your variables that should fix it as nil can be 0
Report Abuse
vlekje513 is not online. vlekje513
Joined: 28 Dec 2010
Total Posts: 9057
04 Jun 2014 03:06 AM
WaitForChild
Report Abuse
FreddieN is not online. FreddieN
Joined: 06 Jan 2014
Total Posts: 261
04 Jun 2014 04:04 AM
So some varible is wrong?
please help me without making me use my own mind!
Report Abuse
nomer888 is online. nomer888
Joined: 13 Feb 2010
Total Posts: 551
04 Jun 2014 04:09 AM
You're making "level" local to the scope of the anonymous function on line 40. Either declare "level" in the global scope (at the start of the script, basically) or declare it a non-local variable.
Report Abuse
FreddieN is not online. FreddieN
Joined: 06 Jan 2014
Total Posts: 261
04 Jun 2014 04:18 AM
OUTPUT
11:10:08.774 - Attempt to connect failed: Passed value is not a function
11:10:08.776 - Script 'Players.Player1.PlayerGui.Misc.Won.touch.Script', Line 42
11:10:08.778 - Stack End
What's wrong now???
Report Abuse
FreddieN is not online. FreddieN
Joined: 06 Jan 2014
Total Posts: 261
04 Jun 2014 04:19 AM
OUTPUT, sorry wrong up


11:17:52.463 - Players.Player1.PlayerGui.Misc.Failed.touch.Script:64: attempt to index global 'curlevel' (a nil value)
11:17:52.468 - Stack Begin
11:17:52.469 - Script 'Players.Player1.PlayerGui.Misc.Failed.touch.Script', Line 64
11:17:52.471 - Stack End
Report Abuse
nomer888 is online. nomer888
Joined: 13 Feb 2010
Total Posts: 551
04 Jun 2014 04:19 AM
My apologies, that lacked proper describing:
"Either declare 'level' in the global scope (at the start of the script, basically)"
Rather, declare "level" local to the global scope, which is wherever blocks are not (don't put it inside anything that opens up a new block, such as if, do, for, etc)
Report Abuse
FreddieN is not online. FreddieN
Joined: 06 Jan 2014
Total Posts: 261
04 Jun 2014 04:22 AM
misc = script.Parent.Parent.Parent
script.Parent.Parent.Parent.Parent.Parent.leaderstats.JAI.Value = script.Parent.Parent.Parent.Parent.Parent.leaderstats.JAI.Value - 1
local Time34 = script.Parent.Parent.Parent.Time3.Value
script.Parent.Parent.Time.Text = (Time34)

local Stage = script.Parent.Parent.Parent.Parent.Parent.leaderstats.Stage.Value
level = misc.Parent.Game[Stage]:GetChildren()
function fade ()

for transparency = 1, 0, -.1 do
script.Parent.Parent.Time.Transparency = transparency
wait(.1)

end
end
function fade2 ()

for transparency = 1, 0, .1 do
script.Parent.Parent.Parent.Info.Transparency = transparency
wait(.1)

end
end
fade()

if script.Parent.Parent.Parent.Parent.Parent.leaderstats.JAI.Value == 0 then


local game = script.Parent.Parent.Parent.Parent
script.Parent.Parent.Parent.Info.Visible = true


wait(4.5)



fade2()
game:ClearAllChildren()
else

end


repeat wait() until script.Parent.MouseEnter:connect(function(x,y)

Stage = script.Parent.Parent.Parent.Parent.Parent.leaderstats.Stage.Value
script.Parent.Parent.Visible = false

script.Parent.Parent.Time.Text = "0"
curlevel = misc.Parent.Game[Stage]

--
misc.Quit.Visible = false
misc.Quit.Sure_quit.Visible = false
--

end)

for i=1,#level do
level[i].Visible = false
misc.black.Transparency = 1
misc.youfailed.Visible = false
misc.black.Visible = false
win = curlevel.Scriptframe.Value.Value
curlevel.Scriptframe.Script.Disabled = false
curlevel.Parent[win].Script.Disabled = false
curlevel.Parent[win].Visible = true
misc.Time3.Value = 0
misc.End.Value = false
misc.Start.Value = true
level2 = misc.Parent.Game[Stage]:GetChildren()

end


for i = 1,#level2 do

level[i].Visible = true

script.Parent.Script.Disabled = true
end


?
Report Abuse
nomer888 is online. nomer888
Joined: 13 Feb 2010
Total Posts: 551
04 Jun 2014 04:25 AM
Try this:

misc = script.Parent.Parent.Parent
script.Parent.Parent.Parent.Parent.Parent.leaderstats.JAI.Value = script.Parent.Parent.Parent.Parent.Parent.leaderstats.JAI.Value - 1
local Time34 = script.Parent.Parent.Parent.Time3.Value
script.Parent.Parent.Time.Text = (Time34)

local Stage = script.Parent.Parent.Parent.Parent.Parent.leaderstats.Stage.Value
local level
local curlevel
function fade ()

for transparency = 1, 0, -.1 do
script.Parent.Parent.Time.Transparency = transparency
wait(.1)

end
end
function fade2 ()

for transparency = 1, 0, .1 do
script.Parent.Parent.Parent.Info.Transparency = transparency
wait(.1)

end
end
fade()

if script.Parent.Parent.Parent.Parent.Parent.leaderstats.JAI.Value == 0 then


local game = script.Parent.Parent.Parent.Parent
script.Parent.Parent.Parent.Info.Visible = true


wait(4.5)



fade2()
game:ClearAllChildren()
else

end


repeat wait() until script.Parent.MouseEnter:connect(function(x,y)

Stage = script.Parent.Parent.Parent.Parent.Parent.leaderstats.Stage.Value
script.Parent.Parent.Visible = false

script.Parent.Parent.Time.Text = "0"
curlevel = misc.Parent.Game[Stage]
level = misc.Parent.Game[Stage]:GetChildren()


--
misc.Quit.Visible = false
misc.Quit.Sure_quit.Visible = false
--

end)

for i=1,#level do
level[i].Visible = false
misc.black.Transparency = 1
misc.youfailed.Visible = false
misc.black.Visible = false
win = curlevel.Scriptframe.Value.Value
curlevel.Scriptframe.Script.Disabled = false
curlevel.Parent[win].Script.Disabled = false
curlevel.Parent[win].Visible = true
misc.Time3.Value = 0
misc.End.Value = false
misc.Start.Value = true
level2 = misc.Parent.Game[Stage]:GetChildren()

end


for i = 1,#level2 do

level[i].Visible = true

script.Parent.Script.Disabled = true
end
Report Abuse
FreddieN is not online. FreddieN
Joined: 06 Jan 2014
Total Posts: 261
04 Jun 2014 04:29 AM
OUTPUT
11:29:20.605 - Players.Player1.PlayerGui.Misc.Failed.touch.Script:62: attempt to get length of local 'level' (a nil value)
11:29:20.607 - Stack Begin
11:29:20.608 - Script 'Players.Player1.PlayerGui.Misc.Failed.touch.Script', Line 62
11:29:20.609 - Stack End
Report Abuse
FreddieN is not online. FreddieN
Joined: 06 Jan 2014
Total Posts: 261
04 Jun 2014 04:35 AM
I hate this BUGGY game.BUMP
Report Abuse
vlekje513 is not online. vlekje513
Joined: 28 Dec 2010
Total Posts: 9057
04 Jun 2014 04:37 AM
. Should be used for properties
WaitForChild for variables that must be there
FindFirstChild for variables that are not sure if there.
Report Abuse
FreddieN is not online. FreddieN
Joined: 06 Jan 2014
Total Posts: 261
04 Jun 2014 04:41 AM
Just fix my broken script!
Report Abuse
vlekje513 is not online. vlekje513
Joined: 28 Dec 2010
Total Posts: 9057
04 Jun 2014 04:45 AM
Get out troll.
Report Abuse
FreddieN is not online. FreddieN
Joined: 06 Jan 2014
Total Posts: 261
04 Jun 2014 01:34 PM
?
Report Abuse
FreddieN is not online. FreddieN
Joined: 06 Jan 2014
Total Posts: 261
04 Jun 2014 01:35 PM
If nobdy is going to help me then i'll just shut this game down.
Report Abuse
FreddieN is not online. FreddieN
Joined: 06 Jan 2014
Total Posts: 261
05 Jun 2014 08:34 AM
Can noboddy help me!
PLEASE
PLEASE
PLEASE


Why cant anyone just fix the script without saying thing i dont understand where i should place.
PLEAASE
PLEASE
PLE............A..
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