im trying to make a part that cut part
mY code:script.Parent.Touched:Connect(function(hit)
print(“Touched”)
script.Parent:SubtractAsync(workspace.Part)
end)
my error : [Unable to cast value to Objects]
im trying to make a part that cut part
mY code:script.Parent.Touched:Connect(function(hit)
print(“Touched”)
script.Parent:SubtractAsync(workspace.Part)
end)
my error : [Unable to cast value to Objects]
The reason why you’re encountering this error is that the expected first parameter of SubtractAsync is a table of objects (not just one object), hence the “Unable to cast value to Objects (plural)”. Consider trying this instead:
script.Parent.Touched:Connect(function()
print(“ouch!”);
script.Parent:SubtractAsync({workspace.Part});
end
If you’re still confused/encountering errors after that, here is a wiki thread dedicated to in-game solid modeling (which includes cutting parts). ![]()