of     1   

ilovecats969
#181947937Monday, January 18, 2016 8:44 PM GMT

Hello, Trying to get the position of the Handle inside a tool however all I am getting is Handle not a valid member of Part but yet if I remove the handle and try to find the position I get the same thing. Can anyone help me please? Pos = Tool.handle.position
Soybeen
#181948065Monday, January 18, 2016 8:46 PM GMT

Make sure that Handle is capitalized the same way in your script as it is in your tool. I notice you are using lower case but I think generally it's called the Handle in most tools.
ilovecats969
#181949024Monday, January 18, 2016 8:59 PM GMT

I changed the Handle to be capitalised and I'm still receiving the same error
FireController1847
#181949066Monday, January 18, 2016 9:00 PM GMT

Can you please post your script here? (The whole thing!!) It's just roblox, deal with it.
Soybeen
#181949227Monday, January 18, 2016 9:02 PM GMT

Handle, then, is not a child of Tool directly. Make sure it's pathed correctly. The output error also says that "Handle is not a valid member of Part" which means that you're not calling from a Tool object, but instead, an actual part.
ilovecats969
#181949738Monday, January 18, 2016 9:09 PM GMT

The Handle is the name of the part inside the Tool for i=1, #toys do toys[i].Handle.Position = Vector3.new(0, 50, 0) end Thankyou
ilovecats969
#181955964Monday, January 18, 2016 10:26 PM GMT

Bump
Soybeen
#181960393Monday, January 18, 2016 11:25 PM GMT

Gonna need the whole script, that looks like a fragment. Handle is not where you specified it to be - we need to figure out where it actually is.
ilovecats969
#181988084Tuesday, January 19, 2016 9:24 AM GMT

local function Weld(x,y) local W = Instance.new("Weld",x) 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 end local toys = script.Parent.Parent.Parent.Parent.Parent.Toys:GetChildren() while true do for i=1, #toys do if toys[i].Name == "Minion" then if(toys[i].Handle.Position - script.Parent.Position).magnitude <=1 then print("Tada") Weld(toys[i], script.Parent) end end end wait() script.Disabled=true end
thelolguy301
#181988374Tuesday, January 19, 2016 9:46 AM GMT

We will also need the parent-child relations: Where exactly the script is located. For example: "script is located in a Part which is in a Model which is in a Tool"
Soybeen
#181988444Tuesday, January 19, 2016 9:52 AM GMT

That is referenced.. local toys = script.Parent.Parent.Parent.Parent.Parent.Toys:GetChildren()
Soybeen
#181988455Tuesday, January 19, 2016 9:53 AM GMT

Can't imagine that it's a problem with the code; it looks proper to me. I've taken that second if-then statement and bundled it with the previous conditional using 'and'. See if that affects anything, but I don't think it should. As long as everything in 'toys' is a parent to a part named Handle, it should be OK. while true do for i=1, #toys do if toys[i].Name == "Minion" and (toys[i].Handle.Position - script.Parent.Position).magnitude <=1 then print("Tada") Weld(toys[i], script.Parent) end end wait() script.Disabled=true end
Soybeen
#181988490Tuesday, January 19, 2016 9:55 AM GMT

Well, everything referenced by toys[i] that is. ...you know what I mean. :)
ilovecats969
#181989233Tuesday, January 19, 2016 10:45 AM GMT

Hmm :/ I really dont know whats wrong hahah This is the error im getting still 10:44:33.831 - Position is not a valid member of Tool 10:44:33.832 - Script 'Workspace.Model.Down.Play', Line 38 10:44:33.833 - Stack End Btw, Thankyou for taking your time helping me! I really appreciate it
Soybeen
#181989455Tuesday, January 19, 2016 10:59 AM GMT

Tools have no position, only Parts do. More critically, though, that looks like an error from a different script entirely. The code I'm looking at only has 29 lines, not 38. Since this is so convoluted with regard to pathing, would you be willing to publish and uncopylock the place you're working in? Or, if that's unappealing, create a mock-place with the same pathing of the critical items?
128Gigabytes
#181993926Tuesday, January 19, 2016 2:31 PM GMT

Tools do have a position Or maybe its called something else I don't remember Can you upload the tool as a model for testing
Soybeen
#182004384Tuesday, January 19, 2016 7:14 PM GMT

Tools only use Grips that affect the position and rotation of the Handle. If you're trying to figure out the position of a tool, it's best to go by a central part, similar to how you'd get a Model's general position.

    of     1