Is it possible to attach a box to the body?
#1
I tried using welds to attach a box to the player body but it didn't work..
(P.S. I'm making a custom tools ..)

Edit:
Here's the script

local picked = true
ptool = script.Parent

function plrCollide(hit)
if hit.Parent.Type == "Character" and picked then
picked = false
local tooltobody = create("Weld")
tooltobody.Parent = ptool
tooltobody.Part1 = ptool
tooltobody.Part2 = hit
tooltobody.Anchor = hit.Position
print("Tool picked up")
end
end

link(script.Parent.Collided, plrCollide)

Second Edit:
I got the weld working but the box doesn't stay on the player, basically the box doesn't stick to the body, instead its under the body..

Third Edit:
I guess the weld here doesn't work like it does in the '3D buildism', I found out that your body just sticks to wherever you hit the part instead of where the weld anchor is.
Reply
#2
The body is by default "locked". If you "unlock" it in Advanced Tools, you should be able to weld to it, I think. But by just scripting, by putting in the positions of the weld in the code, it shouldn't matter.
Reply
#3
(02-27-2012, 08:58 PM)Qwertygiy Wrote: The body is by default "locked". If you "unlock" it in Advanced Tools, you should be able to weld to it, I think. But by just scripting, by putting in the positions of the weld in the code, it shouldn't matter.

I tried setting the position of the weld in the code after posting, this.. still no luck..
Reply
#4
It's been about a year since I tried anything like that; I'll check it out soon and see if I can get it to work.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)