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

Can moving a part with CFrame get it automatically moved somewhere else?

Asked by
farrizbb 465 Moderation Voter
5 years ago
Edited 5 years ago

I heard it can happen with position, but I'm having the problem with CFrame. The Part I'm moving has cancollide off and I'm trying to move it somewhere, but when I do the part gets moved somewhere completely different. For example I can move a part on the y axis and it might move it on the x and z axis as well. Also I think the problem is to do with he part overlapping with the player and I'm wondering whether collision groups would fix it.

Here's the script if you need it.

local Blast = Instance.new("Part")
        local Weld3 = Instance.new("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 = Vector3.new(Player.Character.OuterBall.Size.X * 4, Player.Character.OuterBall.Size.Z, Player.Character.OuterBall.Size.Y)
        Blast.CFrame = Player.Character.OuterBall.CFrame * CFrame.new(0 ,-Blast.Size.X/2 , 0)
        Blast.Orientation = Vector3.new(-45,0,90)
        Blast.Parent = Player.Character

This is the part where I CFrame the part I was talking about earlier.

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

Also I've been told that a suspect was welding. I'm not too sure about that,but that might help you.

1
You're talking about Position clipping and getting pushed to the top of a part. You will want to use CFrame to get it where you want. CFrame also lets you put a rotation. This post has an explanation on more of this: https://scriptinghelpers.org/questions/16565/what-is-the-difference-between-cframe-and-vector3 xPolarium 1388 — 5y
0
I did use CFrame though. farrizbb 465 — 5y

Answer this question