How to move Union?

I’m testing now and trying to Clone() my object and for some reason the part gets in the right place and Union stays in the old place. If I do Part in Part, everything works and falls into place. How do I solve the problem, I don’t really understand.
1

local cameras = game.Workspace.Cameras
	local cam = cameras[1]:clone()
	cam.Name = #cameras:GetChildren() + 1
	cam.Parent = cameras
	cam.Anchored = true
	cam.CFrame = player.Character.HumanoidRootPart.CFrame

try using :PivotTo instead; or use a model

Model and pivotTo works bad too.

When Moving A Union Which Parent is a part the union will always remain detached from the part.
how come are you using a part for a camera and not the union?

unions can do most things parts can do.

you sure? it works for me, show me your code for the pivot to

or you could get the union from the clone then move it to where you want it to

local cameras = game.Workspace.Cameras
	local cam = cameras[1]:clone()
	cam.Name = #cameras:GetChildren() + 1
	cam.Parent = cameras
	cam.Anchored = true
	cam.CFrame = player.Character.HumanoidRootPart.CFrame
    cam.Union.CFrame = player.HumanoidRootPart.CFrame

doesnt work if the union is originally offseted from the part

Camera spawn inside. And I need the camera to be behind the block, based on where the block is facing.

	local cameras = game.Workspace.Cameras
	local cam = cameras[1]:clone()
	cam.Name = #cameras:GetChildren() + 1
	cam.Parent = cameras
	cam.Anchored = true
	cam.CFrame = player.Character.HumanoidRootPart.CFrame
	cam.camera1:PivotTo(cam:GetPivot())

And PivotTo rotate camera -

https://i.imgur.com/s1bNTgc.png

You could make the cameras models and use :SetPrimaryPartCFrame() or :MoveTo().

Also make sure to set the camera as the primary part.

Hope I helped. :smile:

thats not what i meant, just replace your .CFrame with :PivotTo

	cam:PivotTo(player.Character.HumanoidRootPart.CFrame)
1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.