Build
Client service for placement and removal requests in Personal Servers.
local Build = game:GetService("Build")Only available in Personal Servers. In other games CanBuild is false and Place raises an error.
Properties
CanBuild
Build.CanBuild: booleanWhether the local player has build permission in this server.
Rank
Build.Rank: stringThe local player's rank in this server: Owner, Admin, Builder or Visitor.
Methods
Place
Build:Place(centre: Vector3, size: Vector3, options: table?)Sends a placement request to the server. Supported options: Rotation, Name, Shape, Material, Special, Transparency, Team, Color and Solid. Rejected requests fire Refused.
local Input = game:GetService("Input")
Input.MouseDown:Connect(function(button)
local target = Input:Target()
if button == 1 and target and Build.CanBuild then
Build:Place(target.Position + target.Normal * 2, Vector3.new(4, 4, 4), { Color = Color3.fromRGB(240, 200, 60) })
end
end)Remove
Build:Remove(part: Part)Sends a removal request for part to the server.
Press
Build:Press(part: Part)Sends a press for a part whose Type is Button.
Fits
Build:Fits(centre: Vector3, size: Vector3, rotation: Vector3?): booleanReturns true if a part with these bounds would not overlap existing geometry.
Footprint
Build:Footprint(size: Vector3, rotation: Vector3?): Vector3Returns the axis-aligned bounding size of size after applying rotation.
Materials
Build:Materials(): { table }Returns the material list. Each entry has Id, Name and Category.
Events
RankChanged
Build.RankChanged(rank: string)Fires when the local player's rank changes.
Refused
Build.Refused(text: string)Fires when the server rejects a build request. text is the reason.
Saved
Build.Saved(unsaved: number)Fires after the server persists the build. unsaved is the number of pending changes.