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

Why am I receiving the error "Unable to cast string to int64" and what does it mean?

I am trying to make a server-side music system, but MarketplaceService doesn't properly work.

Script:

game.ReplicatedStorage.MusicSystem.NewSong.OnClientEvent:Connect(function(music)
	progres.Size = UDim2.new(0,0,1,0) 
	local song = game.Workspace.SoundSystem.Music.SoundId
	local asset = game.MarketplaceService:GetProductInfo(song) -- This is the line the Error is on.

	songName.Text = asset.Name
	progres:TweenSize(UDim2.new(1,0,1,0),'Out','Linear',(song.TimeLength)-1)
end)

Error: Unable to cast string to int64

Sometimes the error doesn't show up at all.

1 answer

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