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 This wont work

Previous Thread :: Next Thread 
iimerkingalaxy is not online. iimerkingalaxy
Joined: 23 Sep 2013
Total Posts: 223
19 Jun 2014 04:20 PM
the value is a a leaderboard it works its not the problem



wait(.1)
local Me = script.Parent.Parent
local Character = Me.Character
function Click(mouse)
if Me.stats.Element.Value == 1 then
script.Parent.Text = "Fire"
elseif Me.stats.Element.Value == 2 then
script.Parent.Text = "Water"
elseif Me.stats.Element.Value == 3 then
script.Parent.Text = "Wind"
elseif Me.stats.Element.Value == 4 then
script.Parent.Text = "Earth"
elseif Me.stats.Element.Value == 5 then
script.Parent.Text = "Lightning"
if Me.stats.Element.Value == 6 then
script.Parent.Text = "Fire"
Me.stats.Element.Value = 1
end
end
end
script.Parent.MouseButton1Down:connect(Click)
Report Abuse
Reqkt is not online. Reqkt
Joined: 17 Jun 2014
Total Posts: 210
19 Jun 2014 04:24 PM
wait(.1)

local Me = script.Parent.Parent
local Stats = Me.stats
local Char = Me.Character

script.Parent.MouseButton1Down:connect(function(mouse)
if (Stats.Element.Value == 1) then
script.Parent.Text = "Fire"
elseif (Stats.Element.Value == 1)
script.Parent.Text = "Water"
elseif (Stats.Element.Value == 1)
script.Parent.Text = "Wind"
elseif (Stats.Element.Value == 1)
script.Parent.Text = "Earth"
elseif (Stats.Element.Value == 1)
script.Parent.Text = "Lightning"
else
script.Parent.Text = "Fire"
Stats.Element.Value = 1
end end)
Report Abuse
thea96 is not online. thea96
Joined: 09 Feb 2011
Total Posts: 37634
19 Jun 2014 04:25 PM
needs to be elseif on last one?
Report Abuse
Reqkt is not online. Reqkt
Joined: 17 Jun 2014
Total Posts: 210
19 Jun 2014 04:26 PM
wait(.1)

local Me = script.Parent.Parent
local Stats = Me.stats
local Char = Me.Character

script.Parent.MouseButton1Down:connect(function(mouse)
if (Stats.Element.Value == 1) then
script.Parent.Text = "Fire"
elseif (Stats.Element.Value == 2)
script.Parent.Text = "Water"
elseif (Stats.Element.Value == 3)
script.Parent.Text = "Wind"
elseif (Stats.Element.Value == 4)
script.Parent.Text = "Earth"
elseif (Stats.Element.Value == 5)
script.Parent.Text = "Lightning"
else
script.Parent.Text = "Fire"
Stats.Element.Value = 1
end end)
Report Abuse
Reqkt is not online. Reqkt
Joined: 17 Jun 2014
Total Posts: 210
19 Jun 2014 04:26 PM
@thea
It doesn't.
If it isn't 1 - 5, it assumes it is 6.
It saves on characters.
Report Abuse
iimerkingalaxy is not online. iimerkingalaxy
Joined: 23 Sep 2013
Total Posts: 223
19 Jun 2014 04:30 PM
it looks great but theres a error and idk what it is its underlined red
Report Abuse
Reqkt is not online. Reqkt
Joined: 17 Jun 2014
Total Posts: 210
19 Jun 2014 04:34 PM
Output / what is underlined in red?
Report Abuse
iimerkingalaxy is not online. iimerkingalaxy
Joined: 23 Sep 2013
Total Posts: 223
19 Jun 2014 04:37 PM
wait(.1)

local Me = script.Parent.Parent
local Stats = Me.stats
local Char = Me.Character

script.Parent.MouseButton1Down:connect(function(mouse)
if (Stats.Element.Value == 1) then
script.Parent.Text = "Fire"
elseif (Stats.Element.Value == 2)
script.Parent.Text = "Water"
elseif (Stats.Element.Value == 3)
script.Parent.Text = "Wind"
elseif (Stats.Element.Value == 4)
script.Parent.Text = "Earth"
elseif (Stats.Element.Value == 5)
script.Parent.Text = "Lightning"
else
script.Parent.Text = "Fire"
Stats.Element.Value = 1
end end)


all of it
Report Abuse
iimerkingalaxy is not online. iimerkingalaxy
Joined: 23 Sep 2013
Total Posts: 223
19 Jun 2014 04:38 PM
wait(.1)

local Me = script.Parent.Parent
local Stats = Me.stats
local Char = Me.Character

script.Parent.MouseButton1Down:connect(function(mouse)
if (Stats.Element.Value == 1) then
script.Parent.Text = "Fire"
elseif (Stats.Element.Value == 2)
script.Parent.Text = "Water" -- this is red if i delete it then another one turns red
elseif (Stats.Element.Value == 3)
script.Parent.Text = "Wind"
elseif (Stats.Element.Value == 4)
script.Parent.Text = "Earth"
elseif (Stats.Element.Value == 5)
script.Parent.Text = "Lightning"
else
script.Parent.Text = "Fire"
Stats.Element.Value = 1
end end)
Report Abuse
Notunknown99 is not online. Notunknown99
Joined: 05 Sep 2008
Total Posts: 25360
19 Jun 2014 04:40 PM
elseif (condition) then

IE: You need 'then's on your 'elseif' conditionals.
Report Abuse
Reqkt is not online. Reqkt
Joined: 17 Jun 2014
Total Posts: 210
19 Jun 2014 04:42 PM
I forgot the "then"s.


wait(.1)

local Me = script.Parent.Parent
local Stats = Me.stats
local Char = Me.Character

script.Parent.MouseButton1Down:connect(function(mouse)
if (Stats.Element.Value == 1) then
script.Parent.Text = "Fire"
elseif (Stats.Element.Value == 2) then
script.Parent.Text = "Water"turns red
elseif (Stats.Element.Value == 3) then
script.Parent.Text = "Wind"
elseif (Stats.Element.Value == 4) then
script.Parent.Text = "Earth"
elseif (Stats.Element.Value == 5) then
script.Parent.Text = "Lightning"
else
script.Parent.Text = "Fire"
Stats.Element.Value = 1
end end)
Report Abuse
iimerkingalaxy is not online. iimerkingalaxy
Joined: 23 Sep 2013
Total Posts: 223
19 Jun 2014 04:47 PM
its still doesnt work XS
Report Abuse
Reqkt is not online. Reqkt
Joined: 17 Jun 2014
Total Posts: 210
19 Jun 2014 04:48 PM
wait(.1)

local Me = script.Parent.Parent
local Stats = Me.stats
local Char = Me.Character

script.Parent.MouseButton1Down:connect(function(mouse)
if (Stats.Element.Value == 1) then
script.Parent.Text = "Fire"
elseif (Stats.Element.Value == 2) then
script.Parent.Text = "Water"
elseif (Stats.Element.Value == 3) then
script.Parent.Text = "Wind"
elseif (Stats.Element.Value == 4) then
script.Parent.Text = "Earth"
elseif (Stats.Element.Value == 5) then
script.Parent.Text = "Lightning"
else
script.Parent.Text = "Fire"
Stats.Element.Value = 1
end end)
Report Abuse
iimerkingalaxy is not online. iimerkingalaxy
Joined: 23 Sep 2013
Total Posts: 223
19 Jun 2014 05:37 PM
Player = script.Parent.Parent.Parent.Parent.Parent.Parent.Character.Custom
Clan = script.Parent.Parent.Parent.Element.Value

function pick()
script.Disabled = true
if Clan.Value == 0 then
Clan.Value = 1
script.Parent.Text = "Fire"
Player.Clan.Value = "Fire"
elseif Clan.Value == 1 then
Clan.Value = 2
script.Parent.Text = "Water"
Player.Clan.Value = "Water"
elseif Clan.Value == 2 then
Clan.Value = 3
script.Parent.Text = "Wind"
Player.Clan.Value = "Wind"
elseif Clan.Value == 3 then
Clan.Value = 4
script.Parent.Text = "Earth"
Player.Clan.Value = "Earth"
elseif Clan.Value == 4 then
Clan.Value = 5
script.Parent.Text = "Lighting"
Player.Clan.Value = "Lighting"
elseif Clan.Value == 5 then
Clan.Value = 1
script.Parent.Text = "Fire"
Player.Clan.Value = "Fire"
end
script.Disabled = false
end

script.Parent.MouseButton1Down:connect(pick)
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