I’m trying to automatically add grass above a part w/ the command bar. The problem is my calculations seem to be wrong. I’m simply cloning the part I want it to appear on, making it smaller, and then setting its CFrame above the part. The problem is, I can’t seem to figure out how to get it directly on top of my part.
local g = game.Selection:Get() local cl = g:Clone() cl.Size = Vector3.new(cl.Size.X, .2, cl.Size.Z) cl.CFrame = g.CFrame + Vector3.new(0, g.Size.Y/2 + cl.Size.Y, 0) cl.Parent = game.Workspace`
My code offsets the part by a small amount instead of putting it directly on top of the other one.
I essentially want to recreate MoveTo(), but with CFrame. For this one part. I hope that makes sense. This is my desired result:
Any help is appreciated!