Line24 works perfectly,but line 33 won't work and their almost the same it also won't print,why?
Line24:
1 | if frame.RCurrency.Text = = "null" |
2 | then |
3 | Disappear(frame.RCurrency) |
4 | Disappear(frame.RLabel) |
5 |
6 | else |
7 | Appear(frame.RCurrency) |
8 | Appear(frame.RLabel) |
Line33:
1 | if frame.TCurrency = = "null" |
2 | then |
3 | print ( "Null" ) |
4 | Disapear(frame.TCurrency) |
5 | Disapear(frame.TLabel) |
6 | else |
7 | print ( "Not Null" ) |
8 | Appear(frame.TCurrency) |
9 | Appear(frame.TLabel) |
The whole code is here:
01 | frame = script.Parent |
02 | ----Functions----------- |
03 | function Appear(name) |
04 | name.Visible = true |
05 | end |
06 | function Disappear(name) |
07 | name.Visible = false |
08 | end |
09 | function ChangeText(name,txt) |
10 | name.Text = txt |
11 | end |
12 | ----Product stuff------- |
13 | Id = { 158717210 } |
14 | thumbnail = "http://www.roblox.com/Game/Tools/ThumbnailAsset.ashx?aid=" ..Id [ 1 ] .. "&fmt=png&wd=420&ht=420" |
15 | Item = game:GetService( "MarketplaceService" ):GetProductInfo(Id [ 1 ] ) |
Line 39
"else if" that's what you said. even though you added the space
Correction: Try:
"else"
Difference was the space between, we all make typos, Next time double check :) Also you can do else too.
Example :
01 | if frame.RCurrency.Text = = "null" |
02 | then |
03 | Disappear(frame.RLabel) |
04 | Disappear(frame.RCurrency) |
05 | else |
06 | Appear(frame.RCurrency) |
07 | Appear(frame.RLabel) |
08 | end |
09 | ------------------------- |
10 | if frame.TCurrency = = "null" |
11 | then |
12 | print ( "Null" ) |
13 | Disapear(frame.TCurrency) |
14 | Disapear(frame.TLabel) |
15 | else |
16 | print ( "Not Null" ) |
17 | Appear(frame.TCurrency) |
18 | Appear(frame.TLabel) |
19 | end |
if this helped +1