The output says that CanCollide is not a valid value, what went wrong?
Asked by
5 years ago Edited 5 years ago
There is the script:
Used Tuneabl's Sandbox Tutorial
Everything works fine when I comment the Canciollide statement in line 40
03 | local placementHandler = require(script:WaitForChild( "PlacementModule" )) |
04 | local base = workspace.Base |
05 | local items = game:GetService( "ReplicatedStorage" ).Items |
06 | local plane = placementHandler.new(base.Baseplate, base.ItemHolder, 3 ) |
08 | local GreyButton = script.Parent.SelectionFrame:WaitForChild( "Grey" ) |
09 | local BlueButton = script.Parent.SelectionFrame:WaitForChild( "Blue" ) |
17 | local function cancelPlacement() |
21 | if (dummyModel.Parent) then |
32 | local function initiatePlacement(itemName) |
35 | dummyModel = items [ itemName ] :clone() |
36 | currentItemName = itemName |
38 | for _, object in pairs (dummyModel:GetChildren()) do |
39 | if (object:IsA( "BasePart" )) then |
40 | object.Cancollide = false |
44 | dummyModel.Parent = workspace |
46 | local signal = plane:enable(dummyModel) |
48 | signal:connect( function (location, _) |
49 | game:GetService( "ReplicatedStorage" ).ClientPlaced:FireServer(currentItemName, location [ 1 ] ) |
58 | GreyButton.MouseButton 1 Down:Connect( function () |
59 | initiatePlacement( "Grey" ) |
62 | BlueButton.MouseButton 1 Down:Connect( function () |
63 | initiatePlacement( "Blue" ) |
Thanks for the Help!