Cordinate Frame Calculation Help

I am attempting to create a 4 point checking system to detect if an object is on a plot, I am currently having some trouble moving those 4 positions when the object is rotated:

the little part being spawned in is the “point” that is being checked
It only appears to be working at the Cframe Rotation of (0, 0, 0)

Ideally what I would only like

Code:

CFrame.new(plotCFrame.Position) * CFrame.new((placeable.PrimaryPart.Size.X/2)-(sizeCheck.X/2), 0 ,0) * CFrame.new(0, 0, (placeable.PrimaryPart.Size.Z/2)-(sizeCheck.X/2))

The problem is that CFrame.new(plotCFrame.Position) creates a new cframe but with a rotation of 0 by default, so it doesnt matter what the rotation of plotCFrame is, it will always be making a cframe with no rotations. You could try to do the operations on plotCFrame right away instead of on a new cframe like CFrame.new(plotCFrame.Position).

plotCFrame * CFrame.new((placeable.PrimaryPart.Size.X/2)-(sizeCheck.X/2), 0 ,0) * CFrame.new(0, 0, (placeable.PrimaryPart.Size.Z/2)-(sizeCheck.X/2))

My bad, I made a small mistake when getting the main cframes value, problem solved

1 Like

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