Line24 works perfectly,but line 33 won't work and their almost the same it also won't print,why?
Line24:
if frame.RCurrency.Text == "null" then Disappear(frame.RCurrency) Disappear(frame.RLabel) else Appear(frame.RCurrency) Appear(frame.RLabel)
Line33:
if frame.TCurrency == "null" then print("Null") Disapear(frame.TCurrency) Disapear(frame.TLabel) else print("Not Null") Appear(frame.TCurrency) Appear(frame.TLabel)
The whole code is here:
frame = script.Parent ----Functions----------- function Appear(name) name.Visible = true end function Disappear(name) name.Visible = false end function ChangeText(name,txt) name.Text = txt end ----Product stuff------- Id = {158717210} thumbnail = "http://www.roblox.com/Game/Tools/ThumbnailAsset.ashx?aid="..Id[1].."&fmt=png&wd=420&ht=420" Item = game:GetService("MarketplaceService"):GetProductInfo(Id[1]) ----Changing Text------- ChangeText(frame.ProductName,Item.Name) ChangeText(frame.ProductDescription,Item.Description) ChangeText(frame.RCurrency,Item.PriceInRobux) ChangeText(frame.TCurrency,Item.PriceInTickets) ----Thumbnail----------- frame.ProductImage.Thumbnail.Image = thumbnail ----RemoveNulls-------- if frame.RCurrency.Text == "null" then Disappear(frame.RCurrency) Disappear(frame.RLabel) else Appear(frame.RCurrency) Appear(frame.RLabel) ------------------------- if frame.TCurrency == "null" then print("Null") Disapear(frame.TCurrency) Disapear(frame.TLabel) else print("Not Null") Appear(frame.TCurrency) Appear(frame.TLabel) end end
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 :
if frame.RCurrency.Text == "null" then Disappear(frame.RLabel) Disappear(frame.RCurrency) else Appear(frame.RCurrency) Appear(frame.RLabel) end ------------------------- if frame.TCurrency == "null" then print("Null") Disapear(frame.TCurrency) Disapear(frame.TLabel) else print("Not Null") Appear(frame.TCurrency) Appear(frame.TLabel) end
if this helped +1