Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

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

Asked by 4 years ago

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

0
Have you considered using Google and the Roblox Developer Wiki before asking this question? DeceptiveCaster 3761 — 4y
0
No but i'll check it out! j_osephx 3 — 4y

1 answer

Log in to vote
0
Answered by
harstud 218 Moderation Voter
4 years ago

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.

1
Make sure you specify it's a local script! throwawayaccount2001 102 — 4y
1
Thank you so much, this helped! j_osephx 3 — 4y
0
@throwawayaccount2001 Oops forgot that, it should be a local script. harstud 218 — 4y
Ad

Answer this question