This script seems to work fine when I put it into the developer console. When I just put the script, save it, and play the game, the script doesn't remove the "UFO."
for k,v in pairs(game.Workspace:GetChildren()) do
if v.Name == 'UFO' then
v:Destroy()
end
end

6 comments
You did manage to make it run forever but "UFO" can still be in workspace and it doesn't get removed.
@precisionly Try removing the ;, Lua doesn't need them
I instead added while true do and it works fine now.
@Precisionly That's great. Could you accept?
I'd like to mention this is extremely inefficient, you're looping through every object in the workspace hundreds of times a second.
@Nauseating I did what he asked for, never said it was efficient.