this is the codeim using to detect when a block calledblock1 its the otherblock:
function detect(hit) -- Beginning a function
if hit and hit.Name == "Block1" then -- If statement to check for the name and if the object exists.
local assetId = 304840138
game:GetService("InsertService"):LoadAsset(assetId).Parent = game.Workspace
end -- end for if statement
end -- end for function.
script.Parent.Touched:connect(detect) -- Connects function to event.
But when i run it and the block touches the other blocki get this output:
gah
11:49:43.970 - Plugin_142619509.1.put in worksoace:9: attempt to index local 'sl' (a nil value)
11:49:43.973 - Stack Begin
11:49:43.975 - Script 'Plugin_142619509.1.put in worksoace', Line 9
11:49:43.975 - Stack End
11:49:44.797 - httpGet http://assetgame.roblox.com/Asset/?id=304840138&serverplaceid=0&clientinsert=0 failed. Trying again. Error: HTTP 403 (HTTP/1.1 403 Forbidden). Elapsed time: 0.869079
11:49:45.624 - Content failed for http://assetgame.roblox.com/Asset/?id=304840138&serverplaceid=0&clientinsert=0 because HTTP 403 (HTTP/1.1 403 Forbidden)
11:49:45.627 - Content failed because HTTP 403 (HTTP/1.1 403 Forbidden)
11:49:45.640 - HTTP 403 (HTTP/1.1 403 Forbidden)
11:49:45.642 - Script 'Workspace.Part.Script', Line 4
11:49:45.644 - Stack End
11:49:45.665 - HTTP 403 (HTTP/1.1 403 Forbidden)
11:49:45.669 - Script 'Workspace.Part.Script', Line 4
11:49:45.673 - Stack End
11:49:45.675 - HTTP 403 (HTTP/1.1 403 Forbidden)
11:49:45.676 - Script 'Workspace.Part.Script', Line 4
11:49:45.678 - Stack End
I havent got any plugins activated and Ihavent got anywhere called worksoace. I have got a block called Block1 in my workspace.
Any helpplease. Thanks

1 comment
Workspace is in every game. It is where all visible parts are located. As for the plugins, you must have some sort of plugin installed, as it is detecting it, and the plugin has errors. Would suggest checking your plugin folder and uninstalling any plugin. As for your script, maybe the asset id isn't loading