![]() You can fix this by doing: Part2.CFrame = CFrame.new(0, 0, 5) * (Part2. The only “caveat” is the rotational properties will be reset. To force Part2 to stay at and not yield to Part1, you would change the CFrame value instead: Part2.CFrame = CFrame.new(0, 0, 5) - Perfect! But. This is just a weird thing that Position does. If you do it like this: Part2.Position = Vector3.new(0, 0, 5) -Part2 will actually move to For future reference though, if you ever need to teleport something, please change Object.CFrame instead of Object.Position as the latter will not move to the exact position if another part is there.īasically, let’s say there is a Part1 at you want to move Part2 from to. Though, I would check if the CFrame is correct in it, I am not sure if it is or not, but if the jetpack appears in front of your torso, then replace weld.C0 = CFrame.new(0, 0, -5) to weld.C0 = CFrame.new(0, 0, 5).The others have answered your question nicely. That should do it for welding the jetpack to your torso. Even if the two parts are not touching one another, they can be welded together. ![]() The constraint makes sure that the parts stay in the same relative position and orientation to one another, meaning that if one part moves, the other will move the same amount. Weld.C0 = CFrame.new(0, 0, -5) - We use the C0 property of Weld's WeldConstraint is used to attach two BaseParts together. Local weld = Instance.new("Weld", player.Torso) - We use 'Weld' here, instead of Motor6D JetpackClone.Parent = player - Is the 'Player' a Player, or a character? JetpackClone.PrimaryPart = jetpackClone.Core To fix this, instead, your code should be local player = script.Parent That would be fine, if you didn't use a numerical value with Vector3's. In this fragment, you did moveTo( + * -5) One thing that Ahmad forgot is that 'lookVector' is not a CFrame, it is a Vector3 instead. Like Ahmad said, moveTo is used for models that doesn't have a primary part.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |