Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I get one part to follow another part's orientation/rotation?

Asked by 6 years ago

How do I get one part to follow another part's orientation/rotation?

Basically in the following script, this person hovers above the character but won't follow the oreitation/rotation of the character.

local Player = game.Players.LocalPlayer
local Character = Player.Character or Player.CharacterAdded:wait()
local Mouse = Player:GetMouse()

while true do
    Character["Fire Mage"].HumanoidRootPart.BodyPosition.Position = Character.Torso.Position + Vector3.new(0,7,0)
    Character["Fire Mage"].HumanoidRootPart.Orientation = Character.HumanoidRootPart.Orientation
    wait(0.05)
end
0
You can use rotation = CFrame - CFrame.p which will leave only the rotation. User#5423 17 — 6y
0
I would just use welding if you want the same orientation and rotation of the other part. http://wiki.roblox.com/index.php?title=Weld TickTockTheory 106 — 6y
0
You can use a property of the CFrame.new(Part1,Part2) this'll make part1 look at part2. Shadi432 69 — 6y

Answer this question