I got this script on a brick (part1) for pointing another brick(part2)
part1 = script.Parent.parent.part1 part2 = script.Parent.parent.part2 CFrame.new(part1.Position,part2.Position)
and in the workspace i got two normal bricks called part1 and part2 with anchor and collisions on.
I preferred to use relative object selection because then i can store the parts where I want when I fix the problem.
the script would be theorically correct but when i start the game it doesnt change the orientation
Revised
local part1 = script.Parent.Parent.part1 local part2 = script.Parent.Parent.part2 part1.CFrame = CFrame.new(part1.Position, part2.Position)
Firstly, you need to capitalize all the parents when defining the variables, since Parent
is a property of the parts
Secondly, you can't just define a new CFrame and expect something to happen, since the game doesn't know what part's CFrame is supposed to be changed (in the example above, the part1 CFrame is altered)