Can someone undeprecate this code

So i want to make a code, it has error, which ill fix later but i dont want another error when the function gets destroyed

so heres the code i made:

newObstacle:SetPrimaryPartCFrame(newObstacle.PrimaryPart.CFrame.X, newObstacle.PrimaryPart.CFrame.Y, latestObstacle.PrimaryPart.CFrame.Z - 100)

idk what to replace the function with cuz its deprecated

:white_check_mark: Solved by pseudosc1ence in post #3

newObstacle:PivotTo(newObstacle.PrimaryPart.CFrame.X, newObstacle.PrimaryPart.CFrame.Y, latestObstacle.PrimaryPart.CFrame.Z - 100)

SetPrimaryPartCFrame is now deprecated

newObstacle:PivotTo(CFrame.new(newObstacle.PrimaryPart.Position.X, newObstacle.PrimaryPart.Position.Y, latestObstacle.PrimaryPart.Position.Z - 100))
2 Likes
newObstacle:PivotTo(newObstacle.PrimaryPart.CFrame.X, newObstacle.PrimaryPart.CFrame.Y, latestObstacle.PrimaryPart.CFrame.Z - 100)

SetPrimaryPartCFrame is now deprecated

1 Like

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