02-27-2012, 06:04 PM
(This post was last modified: 02-28-2012, 07:33 PM by Isaac-Clarke.)
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.
(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.