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 » Scripters
Home Search
 

Re: should this work?

Previous Thread :: Next Thread 
Mehssi is not online. 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 is not online. 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
Robertoman is not online. Robertoman
Joined: 10 May 2007
Total Posts: 6369
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 is not online. Mehssi
Joined: 15 Mar 2015
Total Posts: 599
17 Nov 2015 11:53 AM
holy sht dude thank you so much
Report Abuse
Robertoman is not online. Robertoman
Joined: 10 May 2007
Total Posts: 6369
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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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