Wyzloc
(Wyzloc)
1
Expectation: 
Result: 
This is what I’m trying to achieve. Here’s what I’ve tried doing:
local Part1 = Instance.new("Part")
Part1.Anchored = true
Part1.Size = Vector3.new(1,1,5)
Part1.CFrame = CFrame.new(0,5,0)
Part1.Parent = workspace
local Part2 = Part1:Clone()
Part2.CFrame = (Part1.CFrame + Part1.CFrame.LookVector * Part1.Size.Z / 2) * CFrame.Angles(0,3,0)
Part2.Parent = workspace
Motofied
(Moto)
2
I altered your code a little bit and I think this should work:
local Part1 = Instance.new("Part")
Part1.Anchored = true
Part1.Size = Vector3.new(5,1,1)
Part1.CFrame = CFrame.new(0,5,0)
Part1.Parent = workspace
local ANGLE = 100--Change this to get your desired angle.
local Part2 = Part1:Clone()
local Origin = Part1.CFrame * CFrame.new(Part1.Size.X / 2, 0,Part1.Size.Z / 2)
local Offset = CFrame.new(Part1.Size.X / 2, 0, -Part1.Size.Z / 2)
Part2.CFrame = (Origin * CFrame.Angles(0,math.rad(ANGLE - 90),0) * Offset)
Part2.Parent = workspace
2 Likes