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

Why are my tools held backwards?

Asked by
Hexcede 52
10 years ago

So I have been making some tools for my game and two of them appear to be held backwards. I have tried rotating the handle and the tools but it doesn't work. I have tried this code:

rarm_weld = Instance.new("Weld")
function onEquipped(mouse)
    local rarm = script.Parent.Parent["Right Arm"]
    local torso = script.Parent.Parent["Torso"]
    rarm_weld.Parent = rarm
    rarm_weld.Part0 = rarm
    rarm_weld.Part1 = torso
    rarm_weld.C0 = CFrame.new(-1.5, 0.5, 0.5) * CFrame.Angles(-1.6, 0, 0)
end
script.Parent.Equipped:connect(onEquipped)
function onUnequipped(mouse)
    rarm_weld.C0 = CFrame.new(-1.5, 0, 0)
    rarm_weld:remove()
end
script.Parent.Unequipped:connect(onUnequipped)

that seems to help when you select the tool but when you re select the tool your arm rips off and falls through the ground. (yes, very funny) I'm not quite sure what to do about it. I am wondering if there is a way to fix this script or do something to the tool. When I mean the tool is held backwards I don't mean that the tool is backwards I mean the arm is backwards and the tool is upside down. (painful!) I would appreciate the help allot!

Sincerely, crazycittykat

EDIT

I have a place with the tools in it. The canopy and wall are the broken ones.http://www.roblox.com/Plugin-Studio-and-Tool-Workshop-place?id=215250479

3 answers

Log in to vote
0
Answered by 10 years ago
rarm_weld.C0 = CFrame.new(-1.5, 0.5, 0.5) * CFrame.Angles(-1.6, 0, 0)

You have this rotating the the tool by -1.6 radians. Try removing the * CFrame.Angles(-1.6, 0, 0)

0
But then the arm is not pointing outwards like your holding a tool Hexcede 52 — 10y
Ad
Log in to vote
0
Answered by
Hexcede 52
9 years ago

Well I figured it out on my own. :l It has something to do with mass and I had to split up the parts. I don't know why but its fixed.

Log in to vote
-4
Answered by 10 years ago

Forget the scripts... just get the plugin, its so much easier

http://www.roblox.com/Tool-grip-editor-item?id=153352998

Also, the way the Handle part is positioned an also affect the way the tool faces

0
Did you look at what I said? I said its not the tool facing the wrong way its the arm! Hexcede 52 — 10y

Answer this question