I am wondering if there is a script that you can put inside a morph that allows you to press a certain key to play a certain piece of audio, so I could use it to play voice lines and stuff like that. I already attempted this but failed miserably. If someone could help me out with this that would be greatly appreciated.
EDIT: Would it be something like this?
function onKeyPress(inputObject, gameProcessedEvent)
if inputObject.KeyCode == Enum.KeyCode.F then
local Sound = Instance.new("Sound", workspace)
Sound.SoundId = "rbxassetid://610752029"
Sound:Play()
end
end
game:GetService("UserInputService").InputBegan:connect(onKeyPress)

1 comment
Must need changed because it doesn't work in the workspace or inside the morph