Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Getting "Unable to cast string to int" on this script. What do I do?

Asked by 7 years ago

What do I have to fix?

script.Audio.PlayAudio.OnServerEvent:connect(function(player)
    if sound.SoundId == "http://www.roblox.com/asset/?id="..soundid then
        sound:Resume()
    else
        sound.SoundId = "http://www.roblox.com/asset/?id="..soundid
        sound:Play()
        game.Workspace.FusionPlaying.Value = "Now Playing "..game:GetService("MarketplaceService"):GetProductInfo(soundid).Name
    end
end)
0
Wich line? RubenKan 3615 — 7y
0
Line 7. BmanGames 0 — 7y
0
I'm assuming FusionPlaying is an IntValue; you probably meant to use a StringValue. Pyrondon 2089 — 7y

Answer this question