What do you want to achieve? Keep it simple and clear!
Clone a tool to the player’s inventory.
What is the issue? Include screenshots / videos if possible!
After cloning and moving a tool to the player’s inventory, it does not show up in the slots.
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
local prompt = script.Parent
local eye = prompt.Parent.Parent.mainEye
local mainEye = game.ReplicatedStorage:WaitForChild("mainEye")
prompt.Triggered:Connect(function(plr)
local char = plr.Character or plr.CharacterAdded:Wait()
if char then
local backpack = plr:FindFirstChildOfClass("Backpack")
if backpack then
local clonedEye = mainEye:Clone()
clonedEye.Parent = backpack
print(clonedEye.Parent)
end
end
end)
Under assumption, mainEye would be the tool and is located inside of the prompt’s parent’s parent.
Though, I suggest that WaitForChild is used and that you check that the item is existent.
@fares14213@seancool07777 And everyone who participated in this post. This is my mistake, since I moved the regular Part without placing it in the Tool.