Why is my part not being CFramed correctly?
I'm trying to CFrame a cylinder part, so that it's start is in the middle of a sphere. The cylinder and the part both vary in the size as they grow,but their base is 4,4,4(sphere) and 8,4,4(cylinder).
I CFrame the part with this part of the script.
1 | Blast.CFrame = Player.Character.OuterBall.CFrame * CFrame.new( 0 , Blast.Size.X/- 2 , 0 ) |
Here is some context if it helps.
01 | local Blast = Instance.new( "Part" ) |
02 | local Weld 3 = Instance.new( "WeldConstraint" ) |
03 | Weld 3. Part 0 = Player.Character.InnerBall |
07 | Blast.Color = Color 3. fromRGB( 0 , 255 , 255 ) |
08 | Blast.Material = "Neon" |
09 | Blast.Transparency = 0.5 |
10 | Blast.CanCollide = false |
11 | Blast.Shape = "Cylinder" |
12 | Blast.Size = Vector 3. new(Player.Character.OuterBall.Size.X * 4 , Player.Character.OuterBall.Size.Z, Player.Character.OuterBall.Size.Y) |
13 | Blast.CFrame = Player.Character.OuterBall.CFrame * CFrame.new( 0 , Blast.Size.X/- 2 , 0 ) |
14 | Blast.Orientation = Vector 3. new(- 45 , 0 , 90 ) |
15 | Blast.Parent = Player.Character |
This is what it looks like:
Image1
This is what it looks like:
Image2
With
1 | Player.Character.OuterBall.CFrame * CFrame.new(Blast.Size.X/- 2 , 0 , 0 ) |
Instead of
1 | Player.Character.OuterBall.CFrame * CFrame.new( 0 , Blast.Size.X/- 2 , 0 ) |
If anymore context is needed please tell me.