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

Why is my custom tool glitched when I equip it?

Asked by 8 years ago

So, I made my own custom shop GUI and I put a tool into the ReplicatedStorage and I bought it. But, when I equip it my character does flips and rotates. All I did for this item is make one of the 2 parts say "Handle" , I didn't script the tool yet. Is that what I am missing... Please Help Me. Thank you

4 answers

Log in to vote
1
Answered by 8 years ago
  1. Your tool is anchored, you will need to have your handle and the rest of the parts inside your tool anchored.

  2. You need to weld your parts with a script, and here is helpful wiki that you can use to do exactly that http://wiki.roblox.com/index.php?title=Weld

Ad
Log in to vote
0
Answered by 8 years ago

If your tool is anchored it will do that. You can either: 1. Go to the properties of the tool and uncheck anchored or 2. When scripting add this line:

game.ReplicatedStorage.Tool.Anchored = false
0
ok I did that know it works but, only the handle shows... Skillsbra 10 — 8y
0
Use welds MrMinecraft998887 87 — 8y
Log in to vote
0
Answered by 8 years ago

ok I did that know it works but, only the handle shows...

Log in to vote
0
Answered by 8 years ago

Weld the sword together

I don't really want to explain, but if you need an explanation here's a link to the wiki. If you have any particular questions ask me.

-- Regular script inside tool
function Weld(x,y)
    local W = Instance.new("Weld")
    W.Part0 = x
    W.Part1 = y
    local CJ = CFrame.new(x.Position)
    local C0 = x.CFrame:inverse()*CJ
    local C1 = y.CFrame:inverse()*CJ
    W.C0 = C0
    W.C1 = C1
    W.Parent = x
end

function Get(A)
    if A.className == "UnionOperation" then
        Weld(script.Parent.Handle, A)
        A.Anchored = false
    else
        local C = A:GetChildren()
        for i=1, #C do
        Get(C[i])
        end
    end
end

function Finale()
    Get(script.Parent)
end

script.Parent.Equipped:connect(Finale)
script.Parent.Unequipped:connect(Finale)
Finale()
I did not personally make this script. I'm unsure who made this script.

And as others suggested, unanchor the tool.

Good Luck!

Answer this question