Rotating model with moving parts up and down while also rotating with the model, how?

So i want the neon blue circle parts to move up and down which i alr got the model/ stage is rotating, and the regular blue parts are rotating but the neon blue lazers arent rotating along with the model, they just stay in place going up and down when clearly their end point is rotating around the model as well

Could i get any help with this?

Do i have to continously update the CFrame of the parts so it stays moving up and down while alos rotating around the model?

TWEEN SCRIPT ( one of the neon blue parts )

local TweenService = game:GetService("TweenService")
local movingPart = script.Parent
local point2 = script.Parent.Parent.Point2


local tweenInfo = TweenInfo.new(
	3, -- number of seconds to complete
	Enum.EasingStyle.Cubic, -- how it moves
	Enum.EasingDirection.InOut, -- how it moves too 
	-1, -- how may times it repeats
	true, -- reverse too aka go back to start
	0 -- seconds before starting
)

local properties = {
	["CFrame"] = point2.CFrame
	--["Position"] = point2.Position + Vector3.new(point2.Position),
}

local tween = TweenService:Create(movingPart, tweenInfo, properties)

tween:Play()
1 Like

Maybe use a Hinge Constraint for spinning:

Maybe use Prismatic Constraints for the up and down.

1 Like

You said neon blue lasers, but do you mean the white lines in your drawing?

It looks like you are tweening them in ToWorldSpace.
You may want to look into using ToObjectSpace.

I think the issue for that is that you can’t run 2 tweens at once. You may have to run a separate tween for the neon circles, but base them off the Position and Rotation of the blue parts.

1 Like

I would say use physics here. Because this is some really complex math if you want to do it without them. and tweens would not work.

YES THIS, but how though, im kinda getting the hang of scripting but CFrames, not as much yet

i rather do it the math scripter way

1 Like

ok so im assuming the neon blue is meant to be on a y Axis sine wave and the blue plates are just spining around a point but the neon blue are also meant to folow this behavior correct?

yes, while tweening up and down

1 Like

Like this part here?
or a solid linear tween

1 Like

idk wym by solid linear tween but yeah thats it, tween up and down, while moving with the rotating part thats the blue circle part

you can do this by using pivot on a model with a main/primarypart block inside of each model aligned to the center. Then just pivot each of those models to the same rotation using their original cframe(set this at start using an attribute) then do a Y offset for each to make them go up and down

this still allows physics to take place if you do the rotation number as attribute from server side you can see it the same on the clients

5a0460861cc5db098e3ca0ff5775de07

can i adjust the way they move up and down, like since or quad or bouncy?

you would have to code that in manually as this just uses a base pivot you could setup a Cframe value and then just tween that on change then set the pivot this will still allow you to use tween to tween that cframe value

this seems very helpful, ill have to take a look at more pivot info with what u said just to get the hang of it because idrk how to implemet on here

1 Like