Get Cframe, adjust it, then apply it

Imma start by explaing what i’m trying to do.
I have 2 parts. One is the “Guide” part that has the position the second part has to go to.
When a player clicks a button the second part cframe should become the Guide cframe without changing only one value, the position,Y value.
Pratically after the button click i should change the second part cframe to the first part one, but the position.y value should be the second part one, this value shouldn’t change.

I have a script i’m trying to use for this, but it doesn’t work

local Posizione = Tycoon.Posizione.CFrame
Posizione =,Punto.Touch.CFrame.Y,Posizione.Z),Posizione.Rotation)

Thank you all!

Fixed it!

		local Posizione ="X"),Punto.Touch.CFrame.Position.Y,Tycoon.Mobili:GetAttribute("Z")),,0,0)
		--Sistema il modello del punto esclamativo
		Punto.Parent = Tycoon.Mobili

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