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

Reloading Sound doesn't play?

Well, I've tried to make a sound play whenever you actually press R, considering I am pretty new to this, it'd be great to get help, thanks!

game:GetService("UserInputService").InputBegan:connect(function(inputObject, gameProcessedEvent)
	if inputObject.KeyCode == Enum.KeyCode.R then
		script.Parent.reload:Play()
	end 
end)

The Code is also in a LocalScript.

1 answer

Add a print before the sound plays.

If it prints, then that means that the issue is the sound ID not being correct / not working, or the sound might not even be there.

If it doesn't print, then your key pressed script is incorrect.

1 comment

1

The location of the script could also be incorrect. This should go inside of StarterPlayerScripts

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