Mehssi
|
  |
| Joined: 15 Mar 2015 |
| Total Posts: 599 |
|
|
| 17 Nov 2015 11:36 AM |
for some reason it won't work, can someone tell me if its the script or the values because the output doesn't say anything
local gks = script.Parent local T2 = workspace.T2 workspace.T2.Changed:connect(function() if T2.Value == "A.C. Milan" then gks.Value = 0 gks.Value = gks.Value + 288778265 if T2.Value == "Arsenal" then gks.Value = 0 gks.Value = gks.Value + 259062808 if T2.Value == "Borussia Dortmund" then gks.Value = 0 gks.Value = gks.Value + 300047286 if T2.Value == "F.C. Barcelona" then gks.Value = 0 gks.Value = gks.Value + 292794495 if T2.Value == "Bayern Munich" then gks.Value = 0 gks.Value = gks.Value + 270904225 if T2.Value == "Chelsea" then gks.Value = 0 gks.Value = gks.Value + 271560572 if T2.Value == "Inter Milan" then gks.Value = 0 gks.Value = gks.Value + 269949578 if T2.Value == "Juventus" then gks.Value = 0 gks.Value = gks.Value + 274195617 if T2.Value == "Liverpool" then gks.Value = 0 gks.Value = gks.Value + 283750061 if T2.Value == "CTY" then gks.Value = 0 gks.Value = gks.Value + 273840519 if T2.Value == "UTD" then gks.Value = 0 gks.Value = gks.Value + 311372542 if T2.Value == "Real Madrid CF" then gks.Value = 0 gks.Value = gks.Value + 269259725 end end end end end end end end end end end end end) |
|
|
| Report Abuse |
|
Mehssi
|
  |
| Joined: 15 Mar 2015 |
| Total Posts: 599 |
|
|
| 17 Nov 2015 11:38 AM |
nvm fixed lol put the ends int he wrong place |
|
|
| Report Abuse |
|
|
| 17 Nov 2015 11:48 AM |
Fail... Fail.... Fail... Fail... Fail... OMG how many times are you going to fail at making an if statement? Ever heard of a table?
local gks = script.Parent local T2 = workspace.T2 local collection={{"A.C. Milan",288778265},{"Arsenal",259062808},{"Borussia Dortmund",300047286}, {"F.C. Barcelona",292794495},{"Bayern Munich",270904225},{"Chelsea",271560572},{"Inter Milan",269949578}, {"Juventus",274195617},{"Liverpool",283750061},{"CTY",273840519},{"UTD",311372542},{"Real Madrid CF",269259725}, {"A.C. Milan",288778265},{"A.C. Milan",288778265},{"A.C. Milan",288778265},{"A.C. Milan",288778265}, {"A.C. Milan",288778265},{"A.C. Milan",288778265},{"A.C. Milan",288778265},{"A.C. Milan",288778265}, {"A.C. Milan",288778265},{"A.C. Milan",288778265},{"A.C. Milan",288778265},{"A.C. Milan",288778265}, {"A.C. Milan",288778265},{"A.C. Milan",288778265},{"A.C. Milan",288778265},{"A.C. Milan",288778265}} workspace.T2.Changed:connect(function() for a,b in pairs(collection)do if T2.Value==b[1] then gks.Value =b[2] end end end) |
|
|
| Report Abuse |
|
Mehssi
|
  |
| Joined: 15 Mar 2015 |
| Total Posts: 599 |
|
|
| 17 Nov 2015 11:53 AM |
| holy sht dude thank you so much |
|
|
| Report Abuse |
|
|
| 17 Nov 2015 12:01 PM |
Yea, I forgot to remove all the copies of the sub tables:
local gks = script.Parent local T2 = workspace.T2 local collection={{"A.C. Milan",288778265},{"Arsenal",259062808},{"Borussia Dortmund",300047286}, {"F.C. Barcelona",292794495},{"Bayern Munich",270904225},{"Chelsea",271560572},{"Inter Milan",269949578}, {"Juventus",274195617},{"Liverpool",283750061},{"CTY",273840519},{"UTD",311372542},{"Real Madrid CF",269259725}} workspace.T2.Changed:connect(function() for a,b in pairs(collection)do if T2.Value==b[1] then gks.Value =b[2] end end end) |
|
|
| Report Abuse |
|