Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How do i stop my tool from being dropped cloning it?

Here is my script: i have searched for a while but none of them was about this issue so i couldn't figure it out

Folder = game.ReplicatedStorage.Tools
Blocks = game.ReplicatedStorage.Blocks

local children = Blocks:GetChildren()
for i = 1, #children do
    a = script.Template:Clone()
    a.Name = (children[i].Name)
	a.Click.Disabled = false
	b = children[i]:Clone()
	b.Name = "Handle"
	b.Size = Vector3.new (1,1,1)
	b.Parent = a
	b.CanCollide = false
	b.Anchored = false
	a.Parent = Folder
end

EDIT: i think it might be this equipt script that breaks it

    if key == "1" then
		if Folder.L1.Value ~= "" then
			DelTool(player.Character)
			local a = player.Backpack[Folder.L1.Value]:clone()
			Folder.Current.Value = 1
			a.Parent = player.Character
		end

1 comment

0

Can you be more specific in your question? :o

1 answer

If you're holding the tool and you clone it, it's automatically parented to the player which is the location when a tool is equipped. This drops the tool onto the ground since it is not currently the selected item by the player. When you clone, you can set the parent on the same line. :Clone().Parent = PARENT.

Bottom Line:

Parent your Cloned Tool

2 comments

0

a.Parent = player.Character?

0

The tool is already in that location. Contact me on Discord and I can help you further. Discord: Bark#4260

This discussion is preserved as it was. New answers, comments, and votes are closed.