ars899
(RaCc0oN)
December 5, 2023, 12:38pm
#1
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.
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
Artzified
(Artzified)
December 5, 2023, 12:39pm
#2
try using :PivotTo instead; or use a model
ars899
(RaCc0oN)
December 5, 2023, 12:43pm
#3
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.
Artzified
(Artzified)
December 5, 2023, 12:47pm
#5
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
Artzified
(Artzified)
December 5, 2023, 1:10pm
#7
doesnt work if the union is originally offseted from the part
ars899
(RaCc0oN)
December 5, 2023, 6:09pm
#8
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
os_clock
(os_clock)
December 5, 2023, 8:02pm
#9
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.
Artzified
(Artzified)
December 6, 2023, 9:09am
#10
thats not what i meant, just replace your .CFrame with :PivotTo
cam:PivotTo(player.Character.HumanoidRootPart.CFrame)
1 Like
system
(system)
Closed
December 20, 2023, 9:09am
#11
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.