What I'm trying to make this script do is when a player killed a test dummy. The item from the test dummy will drop on the ground, but the tool is in lighting though not in the test dummy and if the player don't pick up that item, then it will be remove in a certain amount of time. How can I do that? Can somebody help me?
function Drop() local drops = {"Item"} local G = math.random(1, 1) local Obj = game.Lighting:findFirstChild(drops[G]):Clone() Obj.Parent = game.Workspace -- Obj.Handle.CFrame = script.Parent.Head.CFrame + Vector3.new(5,2,0) script:remove() end while true do wait(.1) if (script.Parent.Humanoid.Health <1) then Drop() end end