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

Why is my part not being CFramed correctly?

Asked by
farrizbb 465 Moderation Voter
5 years ago

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.

Blast.CFrame = Player.Character.OuterBall.CFrame *, Blast.Size.X/-2 --[[Trying to move it by half of the cylinder's x axis so it's start ends up at the front--]], 0)

Here is some context if it helps.

local Blast ="Part")
        local Weld3 ="WeldConstraint")
        Weld3.Part0 = Player.Character.InnerBall
        Weld3.Part1 = Blast
        Weld3.Parent = Blast
        Blast.Name = "Blast"
        Blast.Color = Color3.fromRGB(0,255,255)
        Blast.Material = "Neon"
        Blast.Transparency = 0.5
        Blast.CanCollide = false
        Blast.Shape = "Cylinder"
        Blast.Size = * 4, Player.Character.OuterBall.Size.Z, Player.Character.OuterBall.Size.Y)
        Blast.CFrame = Player.Character.OuterBall.CFrame *, Blast.Size.X/-2, 0)
        Blast.Orientation =,0,90)
        Blast.Parent = Player.Character

This is what it looks like: Image1

This is what it looks like: Image2 With

Player.Character.OuterBall.CFrame *, 0, 0)

Instead of

Player.Character.OuterBall.CFrame *, Blast.Size.X/-2, 0)

If anymore context is needed please tell me.

1 answer

Log in to vote
Answered by 5 years ago


Player.Character.OuterBall.CFrame *, 0, 0))
That still didn't work. I think it might be a collision problem and Roblox is automatically changing the part's position. farrizbb 465 — 5y

Answer this question