script.Parent.MouseClick:connect(function(playerWhoClicked) local person = game.Players:FindFirstChild(playerWhoClicked.Name) local handle = script.Parent.Parent local bodpos= Instance.new("BodyGyro") bodpos.Parent= person.Character["Torso"] person.Character:GetChildren().Position = Vector3.new(handle.Position,handle.Position,handle.Position) end)
i couldn't find any other way to move a body part (without breaking/killing the character) or the model. GetChildren() does not seem to be working for this so Any advice ?
First off, GetChildren() is not what you think it is. GetChildren returns a table with the children of the instance that you called the GetChildren() function on. To change a property of all things inside an instance, you have to use an "pairs" loop. Which is:
for i, v in pairs(something:GetChildren()) do -- "i" is the current index, v is the variable, and something that you set it to. -- do something to v end
Second, BodyGyro is for rotation, not position.
Third, if your intention is to teleport the player, you don't need to move every single part, you can just move the Torso via CFrame.
Hope this helps.