I’m trying to make thing where when the player presses on the flashlight it would then clone itself and appear in the players inventory, Not sure what I’m doing but I cant figure it out.
This is what I got so far.
local clickDetector = script.Parent.ClickDetector
local flashLight = script.Parent
clickDetector.MouseClick:Connect(function(player)
flashLight:Clone()
print("Flashlight cloned")
end)
When the flashlight is cloned it is not put in workspace it is put in a void. To prevent this you can create a variable that the clone is equal to. That way you can access the clone’s properties like parent.
By the way do you want a response to the explosion or the flashlight?
You do not want to set the flashlight’s parent to starter pack you want to set the clone. Also, if you put the clone in starter pack it will not appear until the player dies you want to put it in that player’s specific backpack.