Okey so I wrote this script that clones objects from the server storage and spawns them randomly and it works flawlessly. My problem is getting the object to go away. Inside the object I have this script and it won't seem to work.
if script.Parent == game.Workspace then wait(3) script.Parent:Destroy() end
You are cloning objects. I assume the script is inside the cloned object. Here's the problem:
script.Parent should be the object, not game.Workspace, the condition will never be true, secondly you would be destroying Workspace if that wasn't the case and that's not possible. Change the snippet to
if script.Parent.Parent == game.Workspace then wait(3) script.Parent:Destroy() end