I'm trying to create my own stamper, and I need an Region3 argument for the area to stamp in. I'm stuck on this part. Anyone know to use Region3? Thanks.
Below is my custom stamper tool code.
local RbxStamper = LoadLibrary("RbxStamper")
local InsertService = game:GetService("InsertService")
local dispenser = game.workspace.Part
local player = game.Players.LocalPlayer
local mouse = player:GetMouse()
local regionModule = require(game.workspace.RegionModule)
local stampControl
local pBase = nil
function findBase()
for _, base in pairs(game.workspace["Building Zones"]:GetChildren()) do
if base:IsA("Model") and base.Player.Value == player.Name then
pBase = base
end
end
end
function setupDragger()
if pBase then
local region = ???
stampControl = RbxStamper.SetupStamperDragger(dispenser,mouse,nil,Region3.new( Vector3.new(1, 1, 1), Vector3.new(9, 9, 9) ))
else
warn("Cannot find your building base.")
end
end
function stamp()
setupDragger()
stampControl.Stamped.Changed:connect(function(value)
stampControl.ReloadModel()
end)
end
script.Parent.Equipped:connect(function()
if not pBase then
findBase()
end
stamp()
end)
script.Parent.Unequipped:connect(function()
if stampControl then stampControl.Destroy() pBase = nil end
end)
