I was trying to make an audio play when the player would press a button but I get an error saying "PlayLocalSound Is Not A Valid Member Of Sound." And im not sure how to fix this error. Here is the code
sound = script.Parent function onKeyPress(inputObject, gameProcessedEvent) if inputObject.KeyCode == Enum.KeyCode.Q then sound:Play() end end game:GetService("UserInputService").InputBegan:connect(onKeyPress)
Does anyone know how to fix this error?
Put the sound in the script not the script in the sound and put the script inside PlayerStarterScripts