I’m making a plugin, and I am playing a sound in the Plugin using plugin:PlaySound(instance), but it keeps returning this error:
“The current identity (5) cannot PlaySound (lacking permission 5)”
(section of code:)
local sound = PluginSettings.Sound -- (the sound does exist, that is not the error)
if isPlaying == false then
isPlaying = true
plugin:PlaySound(sound)
end
I wrapped it into a pcall and it just returned the same error.
local sc, er = pcall(function()
local sound = PluginSettings.Sound
if isPlaying == false then
isPlaying = true
plugin:PlaySound(sound)
end
end)
if not sc then
warn(er)
end
Output: “The current identity (5) cannot PlaySound (lacking permission 5)”