How would I do this?

How would I do this ingame?
And not this:

I don’t understand. What is it that your trying to acheive? Please clarify

Are you having trouble with keeping the sphere up top? Then just anchor it

1 Like

If I anchor it, it doesn’t move… The exact thing I want is for the top to move with the sphere, but have the orientation based on the camera.

If you weld the parts to the central moving part you shouldn’t have any issues.


Weld the top to the blue sphere, then just anchor the blue sphere.

1 Like


I don’t know how this could be achieved with physics / welding alone.

Place the “hat” and the sphere in the same model and add a script to this model. Make sure the hat is itself a model, e.g.:

Set the primary part of the model to whatever part you want. It doesn’t matter.

Inside the script, copy/paste this:

local sphere = script.Parent:WaitForChild("Sphere")
local hat = script.Parent:WaitForChild("Model")
local initial_offset = hat:GetPrimaryPartCFrame().p - sphere.Position
	hat:SetPrimaryPartCFrame(sphere.CFrame + initial_offset)

Hopefully this works :^)

With some modifications, I tried your code.
It worked for two seconds.
Then the piece flew away

Thanks for trying. Modified code:

local sphere = script.Parent:WaitForChild("Ball")
local hat = script.Parent:WaitForChild("Shooter")
local initial_offset = hat.CFrame.p - sphere.Position
hat.CFrame = sphere.CFrame + initial_offset

Edit: It disappears if you are still.
When rolling

1 Like

Make sure all the parts for the hat are:

  • Anchored = True
  • CanCollide = False

The parts are flying away because eventually the acceleration on them becomes so great, they fly away

Black cage thing. Position = Sphere.Position +,whatever offset that makes sense, 0)

make black cage thing anchored and cannot collide

As @PerilousPanther said weld it. I don’t know what sort of logic CFraming it every renderstepped is. You can edit the c0 and c1 of the weld via command bar.

if you want the model to have the same rotation as the camera but stay fixed in its position this is how you can do that

-- localscript

local runService = game:GetService("RunService")
local camera = workspace.CurrentCamera
local model = ...

local cFrame = model:GetPivot()

	model:PivotTo(camera.CFrame.Rotation + cFrame.Position)

Thanks you @Zairky and @5uphi
I wish I could do two Solutions…