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

Help with my sword script?

I have edited the sounds for the classic roblox sword.

The sounds play perfectly when i unsheath the sword and start to lunge it as normal. All i need now is to add a sheath sound so when you put the sword away it plays a sound.

local SlashSound = Instance.new("Sound")
SlashSound.SoundId = "http://www.roblox.com/asset/?id=210946558"
SlashSound.Parent = sword
SlashSound.Volume = .7

local LungeSound = Instance.new("Sound")
LungeSound.SoundId = "http://www.roblox.com/asset/?id=210946558"
LungeSound.Parent = sword
LungeSound.Volume = .6

local UnsheathSound = Instance.new("Sound")
UnsheathSound.SoundId = "http://www.roblox.com/asset/?id=210933582"
UnsheathSound.Parent = sword
UnsheathSound.Volume = 1

Any help would be appreciated.

Thank you.

1 answer

✓ Accepted answer

All sounds have a PlayOnRemove propety, if you check it the sound will play when you unequip the tool. No scripting required.

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