So lets say mouse.target is pathed like
folder → aaa → bbb → ccc → targetpart
I want to grab the immediate child of “folder” along the part’s path so in this case ~ it would be the “aaa”. I’ve included my code below, but I’m unsure of how to or if there even is a way to do what I’m asking.
local folder = game.Workspace.Vehicles
tool.Activated:Connect(function()
local player = Players.LocalPlayer
local mouse = player:GetMouse()
if mouse.Target:IsDescendantOf(folder) then
--tool.Place:FireServer(mouse.Target)
end
end)