So i wanted to make a custom character and some tools for it to use (custom character is for the player).
but when i approach the tool to pick it up, i just push the handle and i don’t pick it up.
how do i solve this?
(character is meant to be a kind of Slime,so it doesn’t have arms(if that info even helps))
(edit: i also gave the character a right arm hoping the tool would go there (didn’t work))
Add your own auto pickup system, it shouldn’t be too hard.
Slime.Humanoid.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") then return end
if hit.Parent:IsA("Tool") and hit.Name == "Handle" then
Slime.Humanoid:EquipTool(hit.Parent)
end
end)
I think you’ll need an invisible right arm to hold the tool though.
i made an invisible right arm(your script works btw) ,the tool goes in the backpack,but when you equip it,
the character doesn’t hold it in the right arm instead it just appears on the ground.
how do i make it hold the tool?
Make sure the right arm has the correct attachments like in regular characters. If it doesn’t, the grip welds might not be created. You should copy them from your character and paste them to your custom character, and adjust until the tool goes in the right spot.
Hi!
When you equip a tool, a weld is created within RightHand. The weld is called RightGrip. The tool only checks if you have a child in your Character called RightHand, and then automatically creates a weld inside that part. No need for the attachments (As far as I can tell after testing it this very moment)
so you Kinda solved this one because you gave me an idea when you said roblox makes welds to the right arm.
when i tried putting the attachments and adjusting them,it uhh attached my customcharacters right arm to the normal player character made by roblox’s right arm.(cursed(unsee juice)
but when you said it creates welds i tried creating my own welds in the script you gave me and now they connect perfectly fine.
local function OnTouched(hit)
if hit.Parent:FindFirstChild("Humanoid") then return end
if hit.Parent:IsA("Tool") and hit.Name == "Handle" then
Slime.Humanoid:EquipTool(hit.Parent)
local Weld = Instance.new("Weld")--it's this part i added.
Weld.Parent = Slime.RightArm
Weld.Part0 = Slime.RightArm
Weld.Part1 = hit
end
end
Slime.Humanoid.Touched:Connect(OnTouched)
please tell me if this is dangerous(like maybe it stays stuck forever?) or maybe this is fine?
Yea, you could make your own weld, but then you may as well replace :EquipTool(hit.Parent)
with hit.Parent = Slime
, and then do the weld. The tool’s positioning properties won’t do anything if you make your own weld.
Have you tried naming your arm-part RightHand?
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.