how to get a roblox part to peak
To make a Roblox part “peak” at the top, the usual fix is to place it using the part’s height, and account for rotation if needed. A simple unrotated case is to set its Y position to the other part’s top plus half of the new part’s height.
Simple placement
If you want one part to sit directly on top of another, use:
lua
local floor = workspace.Baseplate
local part = workspace.Part
local y = floor.Position.Y + floor.Size.Y/2 + part.Size.Y/2
part.Position = Vector3.new(floor.Position.X, y, floor.Position.Z)
That works when both parts are aligned normally.
Rotated parts
If the part is rotated, Size.Y / 2 alone is not enough. In that case, people
usually raycast or compute the world-space top point based on the part’s
orientation, then place the new part from that result.
Practical approach
- Find the top surface or highest point of the target part.
- Add half the height of the part you want to place.
- Set the new part’s position or CFrame.
- If rotation matters, use bounding-box or raycast logic instead of raw
Size.Y.
Example use case
If you are spawning a block on a slope or a rotated object, raycasting downward from above is often the cleanest method because it finds the actual contact point in world space.
TL;DR
For a normal part: target.Position.Y + target.Size.Y/2 + newPart.Size.Y/2.
For rotated parts, use raycasting or bounding-box-based placement.