What do you want to achieve?
I want to drop a tool and have the parent of the tool be a folder in the workspace.
What is the issue?
The issue is that when I drop the tool, it goes straight into the workspace, not the folder I want it to go to.
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
I have tried to change the tool parent by checking if the tool’s parent is Workspace and using if then to change it to the folder I want, but it isn’t working.
tool = script.Parent
if tool.Parent == game.Workspace then
tool.Parent = game.Workspace.Folder
end
-- server:
workspace.ChildAdded:Connect(function(tool)
if tool:IsA("Tool") and tool:FindFirstChild("Handle") then
tool.Parent = workspace.Folder
end
end)
You should also rename the folder to ‘Tools’ or something.
So i tried using this but it didn’t work, BUT i did edit it a bit to look like this and it did work but I read that using “wait()” to “fix” an issue isn’t really the solution so idk if this is a smart thing to do?
workspace.ChildAdded:Connect(function(item)
if item:IsA("Tool") then
wait()
if not item.Parent:IsA("Folder") then
item.Parent = workspace.Comp.Comics
end
end
end)
workspace.ChildAdded:Connect(function(item)
if item:IsA("Tool") then
if not item.Parent:IsA("Folder") then
task.defer(function()
item.Parent = workspace.Comp.Comics
end)
end
end
end)