Building System | Easy setup and fast, configurable creation

Easy Setup Building System


This building system makes the model you are placing face the player and distance depends on where the mouse is.

Press F to open building UI, this keybind is editable inside the “UIHandler” localscript. Or you can remove the UI and make your own way to select and build models, which is shown how to do so further down in the topic.

This system consist of distance checks and checks to make sure the player doesn’t build a model inside of a model. There is a configuration folder to edit these values. The system is mainly meant for first-person but can be used in third-person.

How to use

Setting up

  1. Insert the model into your game
  2. Parent BuildingSystem folder in workspace or ReplicatedStorage (it gets automatically parented to ReplicatedStorage, keeping it in workspace is for easier access to creating builds/models)
  3. Parent and ungroup other folders in the location shown in their names (the model does this automatically, so this isn’t required.)

Creating builds

  1. Parent “BuildingModels” to workspace or any descendant in workspace
  2. Create a model inside the “BuildingModels” folder and name it anything
  3. Create a part with a Y size of .1 and make it as wide and as long as your models size and place it at the bottom of your model and set that part to your models primarypart

PrimaryPart example:

  1. Build your model
  2. After you are done, if all steps were done correctly, your build should pop up in the UI and you should be able to place it

Configuring

inside the “Ungroup>ReplicatedStorage” there is a “Settings” folder. Hence the name, this folder contains values that can be changed to configure client and server behavior.

Snapping Points

Whenever the mouse hovers over a part inside a model that has the tag “SnappingPoint” then the build the player currently is placing will snap to an attachments position inside the SnappingPoint. It’s hard to explain how snapping points work, although here is an example.

image

Attachments=Where to pivot to,
SnappingPoint parts=Where to hover to snap to the attachment.

Make sure that these SnappingPoint parts have the tag, “SnappingPoint,” and that the attachments are oriented correctly the way you want.

To disable snapping for a specfic model, insert a tag called “NoSnapping” to that model. This is useful for furniture or small objects.

Correct Example:

Custom Selection System

If you want to remove the UI provided and make your own selection system, it’s really simple. Mainly, you just have to know to do this on a client script:

game.Players.LocalPlayer.PlayerScripts.BuildingSystem.Model.Value = PathToModelInsideBuildingModels


Examples

Media



snapping


Get Model

2 Likes