Changes to Terrain's parent should throw a warning (not an error)

Terrain throws an error when you try to change its parent. Because it’s a BasePart, it can be mistakenly picked up as an actual part by scripts that don’t include the boilerplate code: and basePart.ClassName ~= "Terrain". There are a number of reasons someone might be iterating through all BaseParts in the workspace trying to change their parent, and I’ve included a list of them at the bottom of the post. To remove the need for that redundant block of code and to prevent Terrain from throwing a wrench into whatever you’re doing with BasePart parents in the workspace, instead of erroring when its parent is changed it should throw a warning (doesn’t break code) instead of an error. This would not break any existing scripts (they’d already be broken with current behavior), and would still give the user feedback on why Terrain’s parent isn’t changing if they’re trying to do that for some reason.

Cases in which you might be iterating through all BaseParts in the workspace and changing their parent (pretty much all for use in studio):

  • Select all “Medium stone grey” colored parts in the workspace and parent them to workspace.GreyParts (useful if you have a mess of parts and want to manipulate just the grey piece of the overall model you’re working on)
  • Similar to the above, select parts based on Material=Plastic, Reflectance=0, Transparency=0, Locked=true, CanCollide=true, Anchored=true and change their parent
  • Selecting all large parts in your place and parenting them to one model and oops Terrain is Size=<2044,252,2044> and error
  • Wanting to select loose parts within 10 studs of the origin and parent them to a model and oops Terrain’s position is at the origin
  • Parent all loose parts in the workspace to a model so they’re not making the explorer 100x longer than it needs to be
  • ClearAllChildren on workspace from the command bar (quicker than opening a blank place once you’ve finished a huge mess of CSG work)