Skip to content

API

This is the official API for Placement Service. This page will include every feature contained within the module and show examples of how they work.

Constructors

PlacementService.new()

PlacementService.new(int GridUnit, instance Itemlocation, Enum RotateKey, Enum TerminateKey, Enum RaiseKey, Enum LowerKey, Enum RotateKeyXBOX, Enum TerminateKeyXBOX, Enum RaiseKeyXBOX, Enum LowerKeyXBOX, Instance(s) IgnoredObjects...) | PlacementInfo
Creates and returns a new PlacementInfo object.

Application

local players = game:GetService("Players")
local replicatedStorage = game:GetService("ReplicatedStorage")

local player = players.LocalPlayer
local mouse = player:GetMouse()

local remote = replicatedStorage.remotes:WaitForChild("requestPlacement")
local button = script.Parent

local PlacementService = require(replicatedStorage.modules:WaitForChild("PlacementService"))

local placementInfo = PlacementService.new(
    2, -- Grid Unit
    replicatedStorage.models, -- Item Location
    Enum.KeyCode.R, Enum.KeyCode.X, Enum.KeyCode.U, Enum.KeyCode.L, -- PC KeyCodes
    Enum.KeyCode.ButtonR1, Enum.KeyCode.ButtonX, Enum.KeyCode.DPadUp, Enum.KeyCode.DPadDown, -- XBOX KeyCodes
    objectA, objectB, objectC...
)

Methods

PlacementInfo:activate()

PlacementInfo:activate(string ModelName, instance ItemHolder, instance Plot, bool StackableToggle, bool RotationType, bool AutoPlaceToggle) | void
Activates a placement session.

Application

local players = game:GetService("Players")
local replicatedStorage = game:GetService("ReplicatedStorage")

local player = players.LocalPlayer
local mouse = player:GetMouse()

local remote = replicatedStorage.remotes:WaitForChild("requestPlacement")
local button = script.Parent

local PlacementService = require(replicatedStorage.modules:WaitForChild("PlacementService"))

local placementInfo = PlacementService.new(
    2, -- Grid Unit
    replicatedStorage.models, -- Item Location
    Enum.KeyCode.R, Enum.KeyCode.X, Enum.KeyCode.U, Enum.KeyCode.L, -- PC KeyCodes
    Enum.KeyCode.ButtonR1, Enum.KeyCode.ButtonX, Enum.KeyCode.DPadUp, Enum.KeyCode.DPadDown -- XBOX KeyCodes
)

button.MouseButton1Click:Connect(function()
    placementInfo:activate("Chair", workspace.base.itemHolder, workspace.base, true, false, false)
end)

PlacementInfo:noPlotActivate()

PlacementInfo:noPlotActivate(string objectName, obj placedObjectsLocation, bool smartRotation, bool autoPlace) | void
Activates placement without the requirement of a plot.

Application Equivalent to PlacementInfo:activate() except removes the dependencies of a plot.

PlacementInfo:requestPlacement()

PlacementInfo:requestPlacement(RBXScriptSignal PlacementRF, function callback) | void
Requests and starts the placement process on the server.

Application

-- Assume variables were declared above ^

local placementInfo = PlacementService.new(
    2, -- Grid Unit
    replicatedStorage.models, -- Item Location
    Enum.KeyCode.R, Enum.KeyCode.X, Enum.KeyCode.U, Enum.KeyCode.L, -- PC KeyCodes
    Enum.KeyCode.ButtonR1, Enum.KeyCode.ButtonX, Enum.KeyCode.DPadUp, Enum.KeyCode.DPadDown -- XBOX KeyCodes
)

local function callback() -- This is optional
    print("An object has been placed")
end

button.MouseButton1Click:Connect(function()
    placementInfo:activate("Chair", workspace.base.itemHolder, workspace.base, true, false, false)
end)

mouse.Button1Down:Connect(function()
    placementInfo:requestPlacement(remote, callback)
end)

Callback can also be invoke as shown below:

-- Assume variables were declared above ^

local placementInfo = PlacementService.new(
    2, -- Grid Unit
    replicatedStorage.models, -- Item Location
    Enum.KeyCode.R, Enum.KeyCode.X, Enum.KeyCode.U, Enum.KeyCode.L, -- PC KeyCodes
    Enum.KeyCode.ButtonR1, Enum.KeyCode.ButtonX, Enum.KeyCode.DPadUp, Enum.KeyCode.DPadDown -- XBOX KeyCodes
)

button.MouseButton1Click:Connect(function()
    placementInfo:activate("Chair", workspace.base.itemHolder, workspace.base, true, false, false)
end)

mouse.Button1Down:Connect(function()
    placementInfo:requestPlacement(remote, function()
        print("An object has been placed")
    end)
end)

PlacementInfo:getCurrentState()

PlacementInfo:getCurrentState() | string
Returns a string that corresponds to the current state the module is in.

Application

-- Assume variables were declared above ^

local contextActionService = game:GetService("ContextActionService")

local placementInfo = PlacementService.new(
    2, -- Grid Unit
    replicatedStorage.models, -- Item Location
    Enum.KeyCode.R, Enum.KeyCode.X, Enum.KeyCode.U, Enum.KeyCode.L, -- PC KeyCodes
    Enum.KeyCode.ButtonR1, Enum.KeyCode.ButtonX, Enum.KeyCode.DPadUp, Enum.KeyCode.DPadDown -- XBOX KeyCodes
)

local function placeItem()
    placementInfo:requestPlacement(remote)

    if placementInfo:getCurrentState() == "inactive" then
        contextActionService:UnbindAction("place")
    end
end

button.MouseButton1Click:Connect(function()
    placementInfo:activate("Chair", workspace.base.itemHolder, workspace.base, true, false, false)
    contextActionService:BindAction("place", placeItem, false, Enum.UserInputType.MouseButton1)
end)

PlacementInfo:pauseCurrentState()

PlacementInfo:pauseCurrentState() | void
Pauses the current state that the module is in.

Application

-- Assume variables were declared above ^

local placementInfo = PlacementService.new(
    2, -- Grid Unit
    replicatedStorage.models, -- Item Location
    Enum.KeyCode.R, Enum.KeyCode.X, Enum.KeyCode.U, Enum.KeyCode.L, -- PC KeyCodes
    Enum.KeyCode.ButtonR1, Enum.KeyCode.ButtonX, Enum.KeyCode.DPadUp, Enum.KeyCode.DPadDown -- XBOX KeyCodes
)

button.MouseButton1Click:Connect(function()
    placementInfo:activate("Chair", workspace.base.itemHolder, workspace.base, true, false, false)
end)

-- Pauses the current state of the module if state == "out-of_range".
while true do
    task.wait()

    if placementInfo:getCurrentState() == "out-of-range" then
        placementInfo:pauseCurrentState()
    end
end

PlacementInfo:resume()

PlacementInfo:resume() | void
Resumes any state that has been paused.

Application

-- Assume variables were declared above ^

local placementInfo = PlacementService.new(
    2, -- Grid Unit
    replicatedStorage.models, -- Item Location
    Enum.KeyCode.R, Enum.KeyCode.X, Enum.KeyCode.U, Enum.KeyCode.L, -- PC KeyCodes
    Enum.KeyCode.ButtonR1, Enum.KeyCode.ButtonX, Enum.KeyCode.DPadUp, Enum.KeyCode.DPadDown -- XBOX KeyCodes
)

button.MouseButton1Click:Connect(function()
    placementInfo:activate("Chair", workspace.base.itemHolder, workspace.base, true, false, false)
end)

-- Pauses the current state of the module if state == "out-of_range" for 5 seconds.
while true do
    task.wait()

    if placementInfo:getCurrentState() == "out-of-range" then
        placementInfo:pauseCurrentState()

        task.wait(5)

        placementInfo:resume()
    end
end

PlacementInfo:getPlatform()

PlacementInfo:getPlatform() | string
Returns the current platform used by the player in the form of a string. Platforms: "Mobile", "Console", or "PC".

Application

-- Assume variables were declared above ^

local placementInfo = PlacementService.new(
    2, -- Grid Unit
    replicatedStorage.models, -- Item Location
    Enum.KeyCode.R, Enum.KeyCode.X, Enum.KeyCode.U, Enum.KeyCode.L, -- PC KeyCodes
    Enum.KeyCode.ButtonR1, Enum.KeyCode.ButtonX, Enum.KeyCode.DPadUp, Enum.KeyCode.DPadDown -- XBOX KeyCodes
)

local connection

local function clientPlacement()
    if placementInfo:getCurrentState() == "inactive" and not placementInfo:getPlatform() == "Mobile" then
        contextActionService:UnbindAction("place")
    elseif placementInfo:getCurrentState() == "inactive" and placementInfo:getPlatform() == "Mobile" then
        -- Disconnect mobile inputs
        connection:Disconnect()
    end

    placementInfo:requestPlacement(remote)
end

local function startPlacement(id)
    -- Handle platforms
    if placementInfo:getPlatform() ~= "Mobile" then
        contextActionService:BindAction("place", clientPlacement, false, Enum.UserInputType.MouseButton1, Enum.KeyCode.ButtonR1)
    else
        -- Handle mobile inputs
        connection = placementInfo.MobileUI.place.MouseButton1Click:Connect(clientPlacement)
    end

    placementInfo:activate(id, workspace.base.itemHolder, workspace.base, true, false, false)
end

button.MouseButton1Click:Connect(function()
    startPlacement("Chair")
end)

PlacementInfo:raise()

PlacementInfo:raise() | void
Manually raises the objects floor/default y value. Used mainly for mobile support.

Application

-- Assume variables were declared above ^

local placementInfo = PlacementService.new(
    2, -- Grid Unit
    replicatedStorage.models, -- Item Location
    Enum.KeyCode.R, Enum.KeyCode.X, Enum.KeyCode.U, Enum.KeyCode.L, -- PC KeyCodes
    Enum.KeyCode.ButtonR1, Enum.KeyCode.ButtonX, Enum.KeyCode.DPadUp, Enum.KeyCode.DPadDown -- XBOX KeyCodes
)

local connection1
local connection2

local function raise()
    placementInfo:raise()
end

local function clientPlacement()
    if placementInfo:getCurrentState() == "inactive" and not placementInfo:getPlatform() == "Mobile" then
        contextActionService:UnbindAction("place")
    elseif placementInfo:getCurrentState() == "inactive" and placementInfo:getPlatform() == "Mobile" then
        connection1:Disconnect()
        connection2:Disconnect()
    end

    placementInfo:requestPlacement(remote)
end

local function startPlacement(id)
    -- Handle platforms
    if placementInfo:getPlatform() ~= "Mobile" then
        contextActionService:BindAction("place", clientPlacement, false, Enum.UserInputType.MouseButton1, Enum.KeyCode.ButtonR1)
    else
        connection1 = placementInfo.MobileUI.place.MouseButton1Click:Connect(clientPlacement)
        connection2 = placementInfo.MobileUI.raise.MouseButton1Click:Connect(raise)
    end

    placementInfo:activate(id, workspace.base.itemHolder, workspace.base, true, false, false)
end

button.MouseButton1Click:Connect(function()
    startPlacement("Chair")
end)

PlacementInfo:lower()

PlacementInfo:lower() | void
Manually lowers the objects floor/default y value. Used mainly for mobile support.

Application

-- Assume variables were declared above ^

local placementInfo = PlacementService.new(
    2, -- Grid Unit
    replicatedStorage.models, -- Item Location
    Enum.KeyCode.R, Enum.KeyCode.X, Enum.KeyCode.U, Enum.KeyCode.L, -- PC KeyCodes
    Enum.KeyCode.ButtonR1, Enum.KeyCode.ButtonX, Enum.KeyCode.DPadUp, Enum.KeyCode.DPadDown -- XBOX KeyCodes
)

local connection1
local connection2

local function lower()
    placementInfo:lower()
end

local function clientPlacement()
    if placementInfo:getCurrentState() == "inactive" and not placementInfo:getPlatform() == "Mobile" then
        contextActionService:UnbindAction("place")
    elseif placementInfo:getCurrentState() == "inactive" and placementInfo:getPlatform() == "Mobile" then
        connection1:Disconnect()
        connection2:Disconnect()
    end

    placementInfo:requestPlacement(remote)
end

local function startPlacement(id)
    -- Handle platforms
    if placementInfo:getPlatform() ~= "Mobile" then
        contextActionService:BindAction("place", clientPlacement, false, Enum.UserInputType.MouseButton1, Enum.KeyCode.ButtonR1)
    else
        connection1 = placementInfo.MobileUI.place.MouseButton1Click:Connect(clientPlacement)
        connection2 = placementInfo.MobileUI.raise.MouseButton1Click:Connect(lower)
    end

    placementInfo:activate(id, workspace.base.itemHolder, workspace.base, true, false, false)
end

button.MouseButton1Click:Connect(function()
    startPlacement("Chair")
end)

PlacementInfo:rotate()

PlacementInfo:rotate() | void
Manually rotates the objects. Used mainly for mobile support.

Application

-- Assume variables were declared above ^

local placementInfo = PlacementService.new(
    2, -- Grid Unit
    replicatedStorage.models, -- Item Location
    Enum.KeyCode.R, Enum.KeyCode.X, Enum.KeyCode.U, Enum.KeyCode.L, -- PC KeyCodes
    Enum.KeyCode.ButtonR1, Enum.KeyCode.ButtonX, Enum.KeyCode.DPadUp, Enum.KeyCode.DPadDown -- XBOX KeyCodes
)

local connection1
local connection2

local function rotate()
    placementInfo:rotate()
end

local function clientPlacement()
    if placementInfo:getCurrentState() == "inactive" and not placementInfo:getPlatform() == "Mobile" then
        contextActionService:UnbindAction("place")
    elseif placementInfo:getCurrentState() == "inactive" and placementInfo:getPlatform() == "Mobile" then
        connection1:Disconnect()
        connection2:Disconnect()
    end

    placementInfo:requestPlacement(remote)
end

local function startPlacement(id)
    -- Handle platforms
    if placementInfo:getPlatform() ~= "Mobile" then
        contextActionService:BindAction("place", clientPlacement, false, Enum.UserInputType.MouseButton1, Enum.KeyCode.ButtonR1)
    else
        connection1 = placementInfo.MobileUI.place.MouseButton1Click:Connect(clientPlacement)
        connection2 = placementInfo.MobileUI.raise.MouseButton1Click:Connect(rotate)
    end

    placementInfo:activate(id, workspace.base.itemHolder, workspace.base, true, false, false)
end

button.MouseButton1Click:Connect(function()
    startPlacement("Chair")
end)

PlacementInfo:terminate()

PlacementInfo:terminate() | void
Manually terminates a placement session. Equivelent to pressing the terminate key on PC or XBOX while placing. Is also used for terminating placement sessions on mobile.

Application

-- Assume variables were declared above ^

local cancelRemote = replicatedStorage:WaitForChild("cancelPlacement")

local placementInfo = PlacementService.new(
    2, -- Grid Unit
    replicatedStorage.models, -- Item Location
    Enum.KeyCode.R, Enum.KeyCode.X, Enum.KeyCode.U, Enum.KeyCode.L, -- PC KeyCodes
    Enum.KeyCode.ButtonR1, Enum.KeyCode.ButtonX, Enum.KeyCode.DPadUp, Enum.KeyCode.DPadDown -- XBOX KeyCodes
)

button.MouseButton1Click:Connect(function()
    placementInfo:activate("Chair", workspace.base.itemHolder, workspace.base, true, false, false)
end)

mouse.Button1Down:Connect(function()
    placementInfo:requestPlacement(remote)
end)

cancelRemote.OnClientEvent:Connect(function()
    placementInfo:terminate()
end)

Alternative Application

-- Assume variables were declared above ^

local placementInfo = PlacementService.new(
    2, -- Grid Unit
    replicatedStorage.models, -- Item Location
    Enum.KeyCode.R, Enum.KeyCode.X, Enum.KeyCode.U, Enum.KeyCode.L, -- PC KeyCodes
    Enum.KeyCode.ButtonR1, Enum.KeyCode.ButtonX, Enum.KeyCode.DPadUp, Enum.KeyCode.DPadDown -- XBOX KeyCodes
)

local connection1
local connection2

local function terminate()
    placementInfo:terminate()
end

local function clientPlacement()
    if placementInfo:getCurrentState() == "inactive" and not placementInfo:getPlatform() == "Mobile" then
        contextActionService:UnbindAction("place")
    elseif placementInfo:getCurrentState() == "inactive" and placementInfo:getPlatform() == "Mobile" then
        connection1:Disconnect()
        connection2:Disconnect()
    end

    placementInfo:requestPlacement(remote)
end

local function startPlacement(id)
    -- Handle platforms
    if placementInfo:getPlatform() ~= "Mobile" then
        contextActionService:BindAction("place", clientPlacement, false, Enum.UserInputType.MouseButton1, Enum.KeyCode.ButtonR1)
    else
        connection1 = placementInfo.MobileUI.place.MouseButton1Click:Connect(clientPlacement)
        connection2 = placementInfo.MobileUI.raise.MouseButton1Click:Connect(terminate)
    end

    placementInfo:activate(id, workspace.base.itemHolder, workspace.base, true, false, false)
end

button.MouseButton1Click:Connect(function()
    startPlacement("Chair")
end)

PlacementInfo:editAttribute()

PlacementInfo:editAttribute(string attributeName, any input) | void
Changes the value of the attribute inputted to the value specified (if the attribute exists and the value is compatible with the attribute).

Application

-- Assume variables were declared above ^
local lerp = true

local placementInfo = PlacementService.new(
    2, -- Grid Unit
    replicatedStorage.models, -- Item Location
    Enum.KeyCode.R, Enum.KeyCode.X, Enum.KeyCode.U, Enum.KeyCode.L, -- PC KeyCodes
    Enum.KeyCode.ButtonR1, Enum.KeyCode.ButtonX, Enum.KeyCode.DPadUp, Enum.KeyCode.DPadDown -- XBOX KeyCodes
)

button.MouseButton1Click:Connect(function()
    placementInfo:activate("Chair", workspace.base.itemHolder, workspace.base, true, false, false)
end)

lerpToggle.MouseButton1Click:Connect(function()
    lerp = not lerp
    placementInfo:editAttribute("Interpolation", lerp)
end)

PlacementInfo:haltPlacement()

PlacementInfo:haltPlacement() | void
Pauses the automatic placement. This does not function like PlacementInfo:terminate() as it does not cancel placement.

Application

-- Assume variables were declared above ^

local placementInfo = PlacementService.new(
    2, -- Grid Unit
    replicatedStorage.models, -- Item Location
    Enum.KeyCode.R, Enum.KeyCode.X, Enum.KeyCode.U, Enum.KeyCode.L, -- PC KeyCodes
    Enum.KeyCode.ButtonR1, Enum.KeyCode.ButtonX, Enum.KeyCode.DPadUp, Enum.KeyCode.DPadDown -- XBOX KeyCodes
)

button.MouseButton1Click:Connect(function()
    placementInfo:activate("Chair", workspace.base.itemHolder, workspace.base, true, false, true)
end)

mouse.Button1Down:Connect(function()
    placementInfo:requestPlacement(remote)
end)

mouse.Button1Up:Connect(function()
    placementInfo:haltPlacement()
end)

Signals

PlacementInfo.Activated

PlacementInfo.Activated | void
Fires on each activation.

Application

-- Assume variables were declared above ^

local cancelRemote = replicatedStorage:WaitForChild("cancelPlacement")

local placementInfo = PlacementService.new(
    2, -- Grid Unit
    replicatedStorage.models, -- Item Location
    Enum.KeyCode.R, Enum.KeyCode.X, Enum.KeyCode.U, Enum.KeyCode.L, -- PC KeyCodes
    Enum.KeyCode.ButtonR1, Enum.KeyCode.ButtonX, Enum.KeyCode.DPadUp, Enum.KeyCode.DPadDown -- XBOX KeyCodes
)

button.MouseButton1Click:Connect(function()
    placementInfo:activate("Chair", workspace.base.itemHolder, workspace.base, true, false, false)
end)

mouse.Button1Down:Connect(function()
    placementInfo:requestPlacement(remote)
end)

placementInfo.Activated:Connect(function()
    print("Activated placement!")
end)

PlacementInfo.Placed

PlacementInfo.Placed | string
Fires once an object has been placed and returns it.

Application

-- Assume variables were declared above ^

local cancelRemote = replicatedStorage:WaitForChild("cancelPlacement")

local placementInfo = PlacementService.new(
    2, -- Grid Unit
    replicatedStorage.models, -- Item Location
    Enum.KeyCode.R, Enum.KeyCode.X, Enum.KeyCode.U, Enum.KeyCode.L, -- PC KeyCodes
    Enum.KeyCode.ButtonR1, Enum.KeyCode.ButtonX, Enum.KeyCode.DPadUp, Enum.KeyCode.DPadDown -- XBOX KeyCodes
)

button.MouseButton1Click:Connect(function()
    placementInfo:activate("Chair", workspace.base.itemHolder, workspace.base, true, false, false)
end)

mouse.Button1Down:Connect(function()
    placementInfo:requestPlacement(remote)
end)

placementInfo.Placed:Connect(function(objectName)
    print(objectName)
end)

PlacementInfo.Rotated

PlacementInfo.Rotated | void
Fires once each time the object has been rotated either from user input or a manual rotation (PlacementInfo:rotate()).

Application

-- Assume variables were declared above ^

local cancelRemote = replicatedStorage:WaitForChild("cancelPlacement")

local placementInfo = PlacementService.new(
    2, -- Grid Unit
    replicatedStorage.models, -- Item Location
    Enum.KeyCode.R, Enum.KeyCode.X, Enum.KeyCode.U, Enum.KeyCode.L, -- PC KeyCodes
    Enum.KeyCode.ButtonR1, Enum.KeyCode.ButtonX, Enum.KeyCode.DPadUp, Enum.KeyCode.DPadDown -- XBOX KeyCodes
)

button.MouseButton1Click:Connect(function()
    placementInfo:activate("Chair", workspace.base.itemHolder, workspace.base, true, false, false)
end)

mouse.Button1Down:Connect(function()
    placementInfo:requestPlacement(remote)
end)

placementInfo.Rotated:Connect(function()
    print("Rotated!")
end)

PlacementInfo.Terminated

PlacementInfo.Terminated | void
Fires once each time placement has been terminated either from user input or a manual termination (PlacementInfo:terminate()).

Application

-- Assume variables were declared above ^

local cancelRemote = replicatedStorage:WaitForChild("cancelPlacement")

local placementInfo = PlacementService.new(
    2, -- Grid Unit
    replicatedStorage.models, -- Item Location
    Enum.KeyCode.R, Enum.KeyCode.X, Enum.KeyCode.U, Enum.KeyCode.L, -- PC KeyCodes
    Enum.KeyCode.ButtonR1, Enum.KeyCode.ButtonX, Enum.KeyCode.DPadUp, Enum.KeyCode.DPadDown -- XBOX KeyCodes
)

button.MouseButton1Click:Connect(function()
    placementInfo:activate("Chair", workspace.base.itemHolder, workspace.base, true, false, false)
end)

mouse.Button1Down:Connect(function()
    placementInfo:requestPlacement(remote)
end)

placementInfo.Terminated:Connect(function()
    print("Terminated!")
end)

PlacementInfo.Collided

PlacementInfo.Collided | instance
Fires once each time the object collides with an object and returns the collided object.

Application

-- Assume variables were declared above ^

local cancelRemote = replicatedStorage:WaitForChild("cancelPlacement")

local placementInfo = PlacementService.new(
    2, -- Grid Unit
    replicatedStorage.models, -- Item Location
    Enum.KeyCode.R, Enum.KeyCode.X, Enum.KeyCode.U, Enum.KeyCode.L, -- PC KeyCodes
    Enum.KeyCode.ButtonR1, Enum.KeyCode.ButtonX, Enum.KeyCode.DPadUp, Enum.KeyCode.DPadDown -- XBOX KeyCodes
)

button.MouseButton1Click:Connect(function()
    placementInfo:activate("Chair", workspace.base.itemHolder, workspace.base, true, false, false)
end)

mouse.Button1Down:Connect(function()
    placementInfo:requestPlacement(remote)
end)

placementInfo.Collided:Connect(function(hit)
    print(tostring(hit))
end)

PlacementInfo.ChangedFloors

PlacementInfo.ChangedFloors | bool
Fires once each time the Y level has been changed either from user input or a manual change (PlacementInfo:raise/lower()). Returns a boolean value (true up, false down) as the direction. Does not account for stacking.

Application

-- Assume variables were declared above ^

local cancelRemote = replicatedStorage:WaitForChild("cancelPlacement")

local placementInfo = PlacementService.new(
    2, -- Grid Unit
    replicatedStorage.models, -- Item Location
    Enum.KeyCode.R, Enum.KeyCode.X, Enum.KeyCode.U, Enum.KeyCode.L, -- PC KeyCodes
    Enum.KeyCode.ButtonR1, Enum.KeyCode.ButtonX, Enum.KeyCode.DPadUp, Enum.KeyCode.DPadDown -- XBOX KeyCodes
)

button.MouseButton1Click:Connect(function()
    placementInfo:activate("Chair", workspace.base.itemHolder, workspace.base, true, false, false)
end)

mouse.Button1Down:Connect(function()
    placementInfo:requestPlacement(remote)
end)

placementInfo.ChangedFloors:Connect(function(direction)
    print(direction)
end)

Data

Attributes table

Name Type
AngleTilt bool
AngleTiltAmplitude float
AudioFeedback bool
AudioVolume float
BuildModePlacement bool
CollisionColor3 Color3
Collisions bool
DisplayGridTexture bool
EnableFloors bool
FloorStep int
GridFadeIn bool
GridFadeOut bool
GridTextureID string
HapticFeedback bool
HapticVibrationAmount float
HitboxColor3 Color3
HitboxTransparency float
IncludeSelectionBox bool
InstantActivation bool
Interpolation bool
InvertAngleTilt bool
LerpSpeed float
LineThickness float
LineTransparency float
MaxHeight int
MaxRange int
MoveByGrid bool
PlacementCooldown float
PreferSignals bool
RemoveCollisionsIfIgnored bool
RotationStep int
SelectionBoxCollisionColor3 Color3
SelectionBoxColor3 Color3
SmartDisplay bool
SoundID string
TargetFPS float
TransparencyDelta float
TransparentModel bool
UseHighlights bool
Version string

Return type table

Functions

Function Return Type
PlacementService.new() PlacementInfo
PlacementInfo:activate() void
PlacementInfo:noPlotActivate() void
PlacementInfo:requestPlacement() void
PlacementInfo:terminate() void
PlacementInfo:raise() void
PlacementInfo:lower() void
PlacementInfo:rotate() void
PlacementInfo:getCurrentState() string
PlacementInfo:getPlatform() string
PlacementInfo:pauseCurrentState() void
PlacementInfo:resume() void
PlacementInfo:editAttribute() void
PlacementInfo:haltPlacement() void

Signals

Signal Return Type
PlacementInfo.Activated void
PlacementInfo.Placed string
PlacementInfo.Rotated void
PlacementInfo.Terminated void
PlacementInfo.Collided instance
PlacementInfo.ChangedFloors void

State List

State When active
movement When the object is not colliding or out of range and is not requesting placement.
placing Active on the frame before requesting a placement to the server.
colliding When the object collides with another object on the plane/plot.
inactive When no other state is active and the module is not in use by the player.
out-of-range When the object is not colliding but is out of the range set by the developer.

Error List

Code Message
101 Your trying to activate placement too fast! Please slow down
201 Error code 201: The object that the model is moving on is not scaled correctly. Consider changing it.
301 Error code 301: You have improperly setup your callback function. Please input a valid callback
401 Error code 401: Grid size is too close to the plot size. To fix this, try lowering the grid size.
501 Error code 501: Cannot find a surface to place on. Please make sure one is available.