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

How would I play a laugh-track with a click of a button on my keyboard?

I currently am trying to add a laugh track to my talk show and need help, where do I start?

2 comments

0

Have you considered using Google and the Roblox Developer Wiki before asking this question?

0

No but i'll check it out!

1 answer

✓ Accepted answer

Here, I'm going to use L as the key because that's the first letter of laugh lol.

local UserInputService = game:GetService("UserInputService")
local Laugh = Enter the location of the sound in the Workspace.

UserInputService.InputBegan:Connect(function(input)
    if input.KeyCode == Enum.KeyCode.L then
        Laugh:Play()
    end
end)

This is a basic script, anyone can play the audio though.

3 comments

1

Make sure you specify it's a local script!

1

Thank you so much, this helped!

0

@throwawayaccount2001 Oops forgot that, it should be a local script.

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