Why does my tool get deleted after holding it for a little while. This was something that i implented into my game but i don’t know why it gets deleted and it’s a big issue for me
This occurs because on your tool, RequiresHandle
is set to false, which means the weld between the character’s hand and the handle is never created. Since the handle is not anchored, it will fall into the void, subsequently destroying the tool.
You can either re-enable RequiresHandle
or write your own script that welds or motors the handle to your hand when the tool is equipped.
I turned it on and it still got destroyed. I have the handle get destroyed so the arm doesn’t come up when equipping the tool.
Oh, well, it’s because you’re destroying the handle.
You could just have the part in the workspace, have it give the player an empty tool with RequiresHandle
toggled off when touched, and then destroy itself.
-- Script located under the part in the workspace
local Players = game:GetService("Players")
script.Parent.Touched:Connect(function(hit: Instance): ()
local char = hit:FindFirstAncestorOfClass("Model")
if not char then return end
local player = Players:GetPlayerFromCharacter(char)
if not player then return end
local tool = Instance.new("Tool")
tool.RequiresHandle = false
tool.Parent = player:WaitForChild("Backpack")
script.Parent:Destroy() -- Automatically disconnects the connection
end)
This is probably occurring because you deleted your handle! Without it, Roblox wouldn’t know where the player would hold the tool. If you don’t want the arms to come up when equipping the tool I guess you could just try turning off CanCollide for the Handle.
You can turn RequiresHandle off and just weld the tool to the players arm.
I did the same for a flashlight that I wanted to swing with the characters animations.
This actually worked. I had to edit it slightly but it still work thanks.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.