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
Set the ExplosionType to NoCraters
EDIT: The title was botched! Actual answer: replace
flashLight:Clone().Parent = player:FindFirstChild("Backpack")
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?
I’m sorry, The title was from my recent post and I have no Idea why its there lol.
So how exactly do I parent it to the players inventory?
flashLight.Parent = game.StarterPack . but that didn’t work.
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.
Thank you. Character limitttt.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.