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

How come my SoundList script does not work?

I have done multiple changes in the script, and it is not working, the Output keeps saying local SoundList = { ["music"] = 130767645, ["music2"] = 130:8: attempt to index local 'v' (a number value) 19:37:48.574 - Stack Begin 19:37:48.574 - Script 'local SoundList = { ["music"] = 130767645, ["music2"] = 130', Line 8 19:37:48.575 - Stack End, but I do not understand what I am doing wrong, here is the script I am using;

local SoundList = {
["music"] = 130767645,
["music2"] = 130767645
}
local msg = "m/music"

for i,v in pairs(SoundList) do
if msg:lower():sub(1,2):find(v:lower())+5 then
print("ID found within list")
else
print("ID not existant within list")
end
end

1 answer

Don't put the variables in brackets,. That should help, otherwise, you have to rewrite the whole script.

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