I've been building a game in which the player has to shoot an object through a device. The object in question gets cloned from a folder into the physical workspace. However, it can't execute code based on what its parent is, a vital part of the script.
I've simplified the script and put it below. Can you help me?
while true do wait() if script.Parent.Parent == game.Workspace then script:Remove() end end