Play sound on PromptButtonHoldBegan not working

Hi,
I’m trying to make whenevers someone holds a proximity prompt a sound plays but this isn’t working.
Could i get some help? Thanks in advance!
This is my current code in a local script:

local typing = game.SoundService.SoundEffects.TypingVFX

script.Parent.PromptButtonHoldBegan:Connect(function()

typing:Play()

end)

script.Parent.PromptButtonHoldEnded:Connect(function()

typing:Stop()

end)

Local scripts can’t be used in Workspace.

Just put this local script inside StarterPlayerScripts, then change all of the locations.

1 Like