Hi, I want to fix my issue of whenever I press backspace It just deletes all my scripts in it. I have tried looking for a solution but I couldn’t find one so I decided to ask for help.
I’ve tried disabling dropping and trying to make the drop key different, but it just ends up stuck on the player’s hand
(example):
Here’s what the code looks like.
–
local tool = script.Parent
local playerInputService = game:GetService(“UserInputService”)
local equipped = false
tool.Equipped:Connect(function()
equipped = true
tool.Handle.PressE.Enabled = false
end)
tool.Unequipped:Connect(function()
equipped = false
end)
playerInputService.InputBegan:Connect(function(input)
if equipped == true then
if input.keyCode == Enum.KeyCode.P then
tool.Parent = workspace
wait(0.1)
tool.Handle.PressE.Enabled = true
equipped = false
end
end
end)
Are there any tips on how I can combat this bug?
(also sorry if I put this under the wrong category couldn’t decide if this should’ve been code review or scripting support)