The following warnings occurred:
Warning [2] Undefined array key "lockoutexpiry" - Line: 94 - File: global.php PHP 8.4.12 (Linux)
File Line Function
/global.php 94 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined array key "lockoutexpiry" - Line: 573 - File: global.php PHP 8.4.12 (Linux)
File Line Function
/global.php 573 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined variable $can_access_moderationqueue - Line: 752 - File: global.php PHP 8.4.12 (Linux)
File Line Function
/global.php 752 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined array key "avatartype" - Line: 892 - File: global.php PHP 8.4.12 (Linux)
File Line Function
/global.php 892 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined array key "avatartype" - Line: 892 - File: global.php PHP 8.4.12 (Linux)
File Line Function
/global.php 892 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined variable $awaitingusers - Line: 34 - File: global.php(959) : eval()'d code PHP 8.4.12 (Linux)
File Line Function
/global.php(959) : eval()'d code 34 errorHandler->error
/global.php 959 eval
/printthread.php 16 require_once
Warning [2] Undefined array key "style" - Line: 1024 - File: global.php PHP 8.4.12 (Linux)
File Line Function
/global.php 1024 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined property: MyLanguage::$lang_select_default - Line: 5327 - File: inc/functions.php PHP 8.4.12 (Linux)
File Line Function
/inc/functions.php 5327 errorHandler->error
/global.php 1024 build_theme_select
/printthread.php 16 require_once
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.4.12 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.4.12 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.4.12 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.4.12 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.4.12 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.4.12 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.4.12 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.4.12 (Linux)
File Line Function
/printthread.php 165 errorHandler->error



2DWorlds Forums
Is it possible to attach a box to the body? - Printable Version

+- 2DWorlds Forums (http://2dworlds.buildism.net/forum)
+-- Forum: 2DWorlds (http://2dworlds.buildism.net/forum/forumdisplay.php?fid=4)
+--- Forum: Scripting (http://2dworlds.buildism.net/forum/forumdisplay.php?fid=13)
+--- Thread: Is it possible to attach a box to the body? (/showthread.php?tid=8928)



Is it possible to attach a box to the body? - umadtoobad - 02-27-2012

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.


RE: Is it possible to attach a box to the body? - Qwertygiy - 02-27-2012

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.


RE: Is it possible to attach a box to the body? - umadtoobad - 02-27-2012

(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..


RE: Is it possible to attach a box to the body? - Qwertygiy - 02-27-2012

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.