#please help me with this. gun unequiped bullet still appear:(

1 messages · Page 1 of 1 (latest)

silent nova
#

second try to get help. i tried to make a working gun now the problem is when i equip a gun its work! PROBLEM: BUT when i uneqquiped then equip it again tryna shoot the bullet appear but there is ANOTHER bullet also appear at the previous location before i uneqquiped the gun if you didnt understand i put a video in this post you can take a look you can help me by giving a code to fix it or give a link with same problem and solved
this bug maybe bc i didnt write if unequiped it disable the script or another thing i forgot to write.
so yeah please help me:(

ancient baneBOT
#

studio** You are now Level 4! **studio

silent nova
#

i try to add equipped and unequipped but i didnt know how to😭 please help me im confused

desert wren
#

@silent nova Maybe try to check if the deagle is equipped or not with an if statememt, prob will do the trick

acoustic vortex
#

You can make guns a different way.

local Equipped = false
local UserInputService = game:GetService("UserInputService")
tool.Equipped:Connect(function()
         Equipped = true
end)
tool.UnEquipped:Connect(function()
         Equipped = false
end)

UserInputService.InputBegan:Connect(function(i,e)
     if e then return end
     if i.KeyCode = Enum.KeyCode.E and Equipped then
            -- Your Damaging Logic
     end
end)```
#

@silent nova

acoustic vortex
ancient baneBOT
#

studio** You are now Level 5! **studio

silent nova
#

wait but how do I use remote events