1_kly
(kly)
August 20, 2021, 1:05pm
1
(FE GUN KIT)
I added the IdleSound code.
I am no coder, but I know a little bit, but when I unequip the gun, the idle sound doesn’t stop.
Here is an example:
The song keeps playing, how do I make it stop after I unequip it?
(credits to JJBA for the sounds or something)
Show the whole code in a code block. It will be easier to fix it for me and potentially others.
1_kly
(kly)
August 20, 2021, 1:13pm
3
I don’t know how to do code block, and the code is about 2667 lines long.
I haven’t used the forums in over a year, can I just send you a model of the code?
line 2404 is the idlesound code
(NOT MY SCRIPT)
Uh… I have a small problem.
1_kly
(kly)
August 20, 2021, 1:17pm
5
Alright, I turned on allow copying, now help me please.
How to code block (can be used in the future):
Open a script
Click somewhere in the script editor
Ctrl + A
Go to DevForum
Make a new reply
Press Enter once
Ctrl + V
Ctrl + A
Ctrl + E
Use the Unequipped Event.
Tool.Unequipped:Connect(function()
Handle.IdleSound:Stop()
end)
1_kly
(kly)
August 20, 2021, 1:20pm
8
Wait, I think I know a fix for it, sorry, I wasn’t using my brain, I guess lol.
I have to do
Tool.Unequipped:connect(function()
Handle.IdleSound:Stop()
SmokeTrail:StopEmission()
if Module.ChargedShotAdvanceEnabled then
Charging = false
right?
2 Likes
I was going to mention that, you solved it by yourself.
1 Like