There is the script:
Used Tuneabl's Sandbox Tutorial Everything works fine when I comment the Canciollide statement in line 40
--------------------------Vars---------------------------------------------
local placementHandler = require(script:WaitForChild("PlacementModule"))
local base = workspace.Base
local items = game:GetService("ReplicatedStorage").Items
local plane = placementHandler.new(base.Baseplate, base.ItemHolder, 3)
local GreyButton = script.Parent.SelectionFrame:WaitForChild("Grey")
local BlueButton = script.Parent.SelectionFrame:WaitForChild("Blue")
local dummyModel
local signal
local currentItemName
------------------------------------------Functions-------------------
local function cancelPlacement()
if (dummyModel) then
plane:disable()
if (dummyModel.Parent) then
dummyModel:Destroy()
end
dummyModel = nil
signal = nil
currentItemName = nil
end
end
local function initiatePlacement(itemName)
cancelPlacement()
dummyModel = items[itemName]:clone()
currentItemName = itemName
for _, object in pairs(dummyModel:GetChildren()) do
if (object:IsA("BasePart")) then
object.Cancollide = false
end
end
dummyModel.Parent = workspace
local signal = plane:enable(dummyModel)
signal:connect(function(location, _)
game:GetService("ReplicatedStorage").ClientPlaced:FireServer(currentItemName, location[1])
cancelPlacement()
end)
end
---------------------------------Buttons----------------------------------
GreyButton.MouseButton1Down:Connect(function()
initiatePlacement("Grey")
end)
BlueButton.MouseButton1Down:Connect(function()
initiatePlacement("Blue")
end)
Thanks for the Help!
