Hi, recently I was going to make a mini-game where you pick up a part from one corner, and take it to your corner for a point. However, I came across some problems with not being able to hold the tool after setting the property Tool.RequiresHandle = false.
Any sort of help is appreciated, perhaps on what I can do to go around it would also help.
Screenshot provided:
The tool shows it’s equipped, but not really. Does this mean using Tool.RequiresHandle = false isn’t reliable?
Code:
local model = game.Workspace:FindFirstChild("Model")
local deb = false
for i,v in pairs(model:GetChildren()) do
if v:IsA("BasePart") then
v.Name = math.random(1,100)
v.Touched:Connect(function(Obj)
if Obj.Parent:FindFirstChild("Humanoid") and deb == false then
deb = true
print("Touched " .. v.Name)
local newTool = Instance.new("Tool")
newTool.Parent = game.Players[Obj.Parent.Name].Backpack
newTool.RequiresHandle = false
v:Destroy()
deb = false
end
end)
end
end
Since there is no handle to utilize Roblox’s prefabbed weld, you will most likely need to weld the unanchored part to the player’s hand when it is equipped, and destroy the weld once they unequip it.
The problem you’ve posted is wildly confusing or not explained well. Whichever one it is, I’m not able to find an actual problem, use case or the intended behaviour you seek.
Your code is behaving exactly as intended: tools with RequiresHandle false and no Handle will not play the tool equipped animation. The tool you create is equipped. The part won’t appear in your hands because you have no code for it written down.
Something else - set properties first before the parent. The Instance.new with parent argument debacle is still applicable if you don’t use the parent argument but instead set the parent property after creating an instance.
I’m not entirely sure what you’re trying to solve here or if you’re just testing. If you need help with a problem, please supply some actual context in the post. You can also create a new thread to avoid hijacking this one if your problem isn’t the same.