|
| 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
|
  |
| 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
|
  |
| Joined: 09 Feb 2011 |
| Total Posts: 37634 |
|
|
| 19 Jun 2014 04:25 PM |
| needs to be elseif on last one? |
|
|
| Report Abuse |
|
|
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
|
  |
| 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 |
|
|
|
| 19 Jun 2014 04:30 PM |
| it looks great but theres a error and idk what it is its underlined red |
|
|
| Report Abuse |
|
|
Reqkt
|
  |
| Joined: 17 Jun 2014 |
| Total Posts: 210 |
|
|
| 19 Jun 2014 04:34 PM |
| Output / what is underlined in red? |
|
|
| Report Abuse |
|
|
|
| 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 |
|
|
|
| 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 |
|
|
|
| 19 Jun 2014 04:40 PM |
elseif (condition) then
IE: You need 'then's on your 'elseif' conditionals. |
|
|
| Report Abuse |
|
|
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 |
|
|
| |
|
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 |
|
|
|
| 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 |
|
|