Hey devs, is there any way to play a random Sound effect whenever a tool handle touches a client?
For eg:
Whenever a player has ‘punched’ someone, it plays a punch SoundEffect.
The SoundEffects are in a folder and if the script detected that the players tool has touched another client it plays a sound from the folder by using math.random().
SwordSFX.rbxl (46.5 KB)
so basically what you need to do is instead of using a folder it would be way more efficient to change the id every time it is touched by a humanoid with math.random
if the file doesn’t work then use please use this uncopylocked version of the game uncopylocked - Roblox if you have any other issues with the pace please tell me and i will fix it you will need to copy the asset id of the sound and put it in the math.random script for 6 different ones
The scripts do work but it doesn’t play the Sound and it displays me this error:
Edit: **Nevermind, I’ve fixed it by changing the SoundID to a content ID.
Before: (issues) script.Parent.Sound.SoundId = 1234567890