Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Why isn't my part tool equipping working on my game?

Asked by 6 years ago

I made a MeshPart in Roblox studio that i want to equip on touch, however, it just doesn't work. I've tried using a script on forcefully equip it onto you when you touch it, i checked to see if it was unanchored, and i even put in a transparent part into as a "handle."

Can anyone help? Thanks, ~Spirit

1 answer

Log in to vote
0
Answered by 6 years ago

From what I understand you want a MeshPart to appear in-game. If it is touched then it equips the item on to the player forcefully, right? I don't really use MeshParts as much so I prefer to insert a part then insert a normal mesh withing it. You should then position this part wherever you want it to be and insert a script into this part Insert the following script into the script you have just created:

script.Parent.Touched:connect(function(hit)
    if hit.Parent:FindFirstChild("Humanoid") then
        hit.Parent.Humanoid:EquipTool(game.ServerStorage.Tool) -- change game.ServerStorage.Tool to the tool location
    end
end)
0
thanks a ton, it worked mrspirit9 68 — 6y
Ad

Answer this question