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

Unable to cast Instance to int64 what does this mean?

		if SoundIdInputFrame == nil then
			
			local GID = tonumber(PlaceHolderText)
			local GetPlaceholderAudioName = game:GetService("MarketplaceService"):GetProductInfo(GID)
			v.PlayerGui.MusicPlayerDisplay.MusicPlayerDisplayFrame.MusicTitle.Text = "Music Title: " .. GetPlaceholderAudioName.Name
			
		end
			
		if SoundIdInputFrame ~= nil then
		
			local GID2 = tonumber(SoundIdInputFrame.Text)
			local GetAudioName = game:GetService("MarketplaceService"):GetProductInfo(GID2)
			v.PlayerGui.MusicPlayerDisplay.MusicPlayerDisplayFrame.MusicTitle.Text = "Music Title: " .. GetAudioName.Name
		
		end

the output keeps saying Unable to cast Instance to int64 I've tried adding Player to the start and then the ID and that still doesn't work I have no idea why it's doing this and its annoying.

2 answers

Never mind I just went with another option since Roblox never actually gives you clear error messages.

You need to change line 3 from this:

local GID = tonumber(PlaceHolderText)

to this:

local GID = tonumber(PlaceHolderText.Text)

You were trying to call tonumber on the instance rather than the instances Text property.

1 comment

0

I already tried that it didnt work and I already removed it and went a different way

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