So, I'm scripting (duh) and I'm using this script below to try and delete a block that is selected.
Mouse.Button2Down:connect(function()
if _G.object:FindFirstChild("special?").Value ~= 1 then
print("Button 2 is down")
print(workspace.PlacedBlocks:FindFirstChild(_G.object))
workspace.PlacedBlocks:FindFirstChild(_G.object):Destroy()
end
end)
But It is outputting as nil with an error. Any help?
_G.object = 4 PlacedBlocks is a group, and contains 4.
special? is a NumberValue that = 0
I've literally been working with this for more than 30 minutes, and I have had no luck. |