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: 170 line script doesn't work and no output .-.

Previous Thread :: Next Thread 
ColdSmoke is not online. ColdSmoke
Joined: 02 Jan 2012
Total Posts: 5784
14 Jun 2013 09:31 AM
local FireClass = {"http://www.roblox.com/asset/?id=118791325","FireBall","Light","","",
"FireSpell",
"MageLight",
}
local WaterClass = {"http://www.roblox.com/asset/?id=118791347","WaterBall","Light","","",
"WaterSpell",
"MageLight",
}
local EarthClass = {"http://www.roblox.com/asset/?id=118791296","EarthBall","Light","","",
"EarthSpell",
"MageLight",
}
local AirClass = {"http://www.roblox.com/asset/?id=118791279","AirBall","Light","","",
"AirSpell",
"MageLight",
}
local PhyscClass = {"http://www.roblox.com/asset/?id=118907217","Stun","Bound Sword","Light","",
"PhyscSpell",
"BoundSword",
"MageLight",
}

local player = Game.Players.LocalPlayer
local Next = script.Parent.Class.ButtonR.Button
local Last = script.Parent.Class.ButtonL.Button
local LCard = script.Parent.Class.Sele_Left
local MCard = script.Parent.Class.Sele_Mid
local RCard = script.Parent.Class.Sele_Right
local Card = 1
local Start = script.Parent.Start.TextButton

Start.MouseButton1Down:connect(function()
Start.Parent.Visible = false
Start.Parent.Parent.Class.Visible = true
while true do
if Card == 1 then
LCard.ImageLabel.Image = PhyscClass[1]
LCard.Words.W1.Text = PhyscClass[2]
LCard.Words.W1.Text = PhyscClass[3]
LCard.Words.W1.Text = PhyscClass[4]
LCard.Words.W1.Text = PhyscClass[5]
MCard.ImageLabel.Image = FireClass[1]
MCard.Words.W1.Text = FireClass[2]
MCard.Words.W1.Text = FireClass[3]
MCard.Words.W1.Text = FireClass[4]
MCard.Words.W1.Text = FireClass[5]
RCard.ImageLabel.Image = WaterClass[1]
RCard.Words.W1.Text = WaterClass[2]
RCard.Words.W1.Text = WaterClass[3]
RCard.Words.W1.Text = WaterClass[4]
RCard.Words.W1.Text = WaterClass[5]
else
if Card == 2 then
LCard.ImageLabel.Image = FireClass[1]
LCard.Words.W1.Text = FireClass[2]
LCard.Words.W1.Text = FireClass[3]
LCard.Words.W1.Text = FireClass[4]
LCard.Words.W1.Text = FireClass[5]
MCard.ImageLabel.Image = WaterClass[1]
MCard.Words.W1.Text = WaterClass[2]
MCard.Words.W1.Text = WaterClass[3]
MCard.Words.W1.Text = WaterClass[4]
MCard.Words.W1.Text = WaterClass[5]
RCard.ImageLabel.Image = EarthClass[1]
RCard.Words.W1.Text = EarthClass[2]
RCard.Words.W1.Text = EarthClass[3]
RCard.Words.W1.Text = EarthClass[4]
RCard.Words.W1.Text = EarthClass[5]
else
if Card == 3 then
LCard.ImageLabel.Image = WaterClass[1]
LCard.Words.W1.Text = WaterClass[2]
LCard.Words.W1.Text = WaterClass[3]
LCard.Words.W1.Text = WaterClass[4]
LCard.Words.W1.Text = WaterClass[5]
MCard.ImageLabel.Image = EarthClass[1]
MCard.Words.W1.Text = EarthClass[2]
MCard.Words.W1.Text = EarthClass[3]
MCard.Words.W1.Text = EarthClass[4]
MCard.Words.W1.Text = EarthClass[5]
RCard.ImageLabel.Image = AirClass[1]
RCard.Words.W1.Text = AirClass[2]
RCard.Words.W1.Text = AirClass[3]
RCard.Words.W1.Text = AirClass[4]
RCard.Words.W1.Text = AirClass[5]
else
if Card == 4 then
LCard.ImageLabel.Image = EarthClass[1]
LCard.Words.W1.Text = EarthClass[2]
LCard.Words.W1.Text = EarthClass[3]
LCard.Words.W1.Text = EarthClass[4]
LCard.Words.W1.Text = EarthClass[5]
MCard.ImageLabel.Image = AirClass[1]
MCard.Words.W1.Text = AirClass[2]
MCard.Words.W1.Text = AirClass[3]
MCard.Words.W1.Text = AirClass[4]
MCard.Words.W1.Text = AirClass[5]
RCard.ImageLabel.Image = PhyscClass[1]
RCard.Words.W1.Text = PhyscClass[2]
RCard.Words.W1.Text = PhyscClass[3]
RCard.Words.W1.Text = PhyscClass[4]
RCard.Words.W1.Text = PhyscClass[5]
else
if Card == 5 then
LCard.ImageLabel.Image = AirClass[1]
LCard.Words.W1.Text = AirClass[2]
LCard.Words.W1.Text = AirClass[3]
LCard.Words.W1.Text = AirClass[4]
LCard.Words.W1.Text = AirClass[5]
MCard.ImageLabel.Image = PhyscClass[1]
MCard.Words.W1.Text = PhyscClass[2]
MCard.Words.W1.Text = PhyscClass[3]
MCard.Words.W1.Text = PhyscClass[4]
MCard.Words.W1.Text = PhyscClass[5]
RCard.ImageLabel.Image = FireClass[1]
RCard.Words.W1.Text = FireClass[2]
RCard.Words.W1.Text = FireClass[3]
RCard.Words.W1.Text = FireClass[4]
RCard.Words.W1.Text = FireClass[5]
else
Card = 1
end
end
end
end
end
end

Next.MouseButton1Down:connect(function()
if Card == 5 then
Card = 1
else
Card = Card+1
end
end)
Last.MouseButton1Down:connect(function()
if Card == 1 then
Card = 5
else
Card = Card-1
end
end)

local ClassV = Instance.new("IntValue",Game.Players.LocalPlayer)
local p = script.Parent.Class.TBar.Buttons.Play

p.MouseButton1Down:connect(function()
if Card == 1 then
ClassV.Value = 1
script.Parent.Class.Visible = false
else if Card == 2 then
ClassV.Value = 2
script.Parent.Class.Visible = false
else if Card == 3 then
ClassV.Value = 3
script.Parent.Class.Visible = false
else if Card == 4 then
ClassV.Value = 4
script.Parent.Class.Visible = false
else if Card == 5 then
ClassV.Value = 5
script.Parent.Class.Visible = false
else return
end
end
end
end
end
end)
end)


_______________________________________________________
So when I click Start button(near top),

Start.MouseButton1Down:connect(function()

It should close the Start Gui and open the Class one, but it does not. I'm not sure if I errored somewhere far in the script or something up there, But I have no clue why this isn't working.

Report Abuse
TheColorMan is not online. TheColorMan
Joined: 30 Jan 2010
Total Posts: 11228
14 Jun 2013 09:48 AM
Since this is really intimidating for me, I would recommend throwing print() statements all over the script. It might be an issue with a function never running when you think it does or a value not being something you thought it was.

print("string") is great for debugging
Report Abuse
grimm343 is not online. grimm343
Joined: 18 Sep 2008
Total Posts: 2796
14 Jun 2013 09:57 AM
I've experienced a similar problem with LocalScripts, if your script itself is fine.
Add a wait() to the top of the script. If the script is fine, it should then work. If not, then you will most likely get the output it wouldn't give you, before.
Report Abuse
Desperian is not online. Desperian
Joined: 07 Feb 2012
Total Posts: 3371
14 Jun 2013 10:02 AM
I've sent you a message with three issues I personally have with it. I would have posted it here, but ROBLOX is blocking my response. Apparently Lua is a highly vulgar language... Who knew?
Report Abuse
ColdSmoke is not online. ColdSmoke
Joined: 02 Jan 2012
Total Posts: 5784
14 Jun 2013 10:06 AM
@color and Grim

I'll try all of that

@Desperian

lol, and I didn't get a message :o
Report Abuse
grimm343 is not online. grimm343
Joined: 18 Sep 2008
Total Posts: 2796
14 Jun 2013 10:16 AM
In the beginning of the month, or something, ROBLOX decided that empty tables were inappropriate. str = {}, I believe it had an issue with.
I tried to send it as a message to the user, but it didn't go through to him (though it didn't tell me, itself).
If it won't let you post it, here, it probably won't go through as a message..
Report Abuse
Desperian is not online. Desperian
Joined: 07 Feb 2012
Total Posts: 3371
14 Jun 2013 11:09 AM
Eurgh, sorry for the inconvenience caused by ROBLOX's automatic classification of Lua as being 'vulgar'. I'll post what I was trying to, to another site.

pastebin [DOT] com / geHwhyTD
Report Abuse
ColdSmoke is not online. ColdSmoke
Joined: 02 Jan 2012
Total Posts: 5784
14 Jun 2013 11:23 AM
Oh thank you for your input

I made this as soon as I woke up so not thinking :P
I'll make changes, Thanks!
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