Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Code works fine yesterday now it had an error "Unable to cast string to int64". What to do?

printing Song[x] output is the music id that was inserted in the table.

local text= script.Parent.TextLabel
local Songs = {} 
local SongNames={}
local Audio = workspace.DJBoardPRO.Brain.Player:WaitForChild("Snd")
local market = game:GetService("MarketplaceService")
local x=1
script.Parent.TextBox.Enter.MouseButton1Click:connect(function()
local Input = script.Parent.TextBox.Text
table.insert(Songs,Input)	
			print(Songs[x])
				local songInfo=market:GetProductInfo(Songs[x])
				local sonName=songInfo.Name
				table.insert(SongNames,sonName)
			text.Text=table.concat(SongNames, ", ")
     
end)

1 answer

Nevermind. It suddenly works even i don't change anything. I don't know why maybe roblox studio is bugging for me.

This discussion is preserved as it was. New answers, comments, and votes are closed.