Getting teleported to tool on equip

I’m making a medkit item for an asymmetrical horror game im working on, but whenever I equip the tool, I keep getting teleported to the position of the handle.

Im not stuipid, ive checked all of the variables, made sure the Handle was unanchored, not touching the ground, every part of the model is connected to the handle through a WeldConstraint (part0 handle), all welds parented to the handle. Although the solution is probably quite simple and im 99% sure ive come across and solved this same issue before, this time its different, idk what else to really say. Any and all help is GREATLY appreciated.

configuration of the model:

Not just the handle has to be unanchored, every part has to be unanchored, or your player will be teleported to the object

2 Likes

Is there an accidently welded part which you didnt mean to weld causing it to become anchored?

They’re using WeldConstraints

1 Like

ok so turns out, i was checking for all parts to be anchored, and i did that by selecting every thing inside of the tool, and for some reason that didnt select all the parts, so it said they were all unanchored, so i went back and individually selected every part (took me like 7 minutes) and found the one anchored part :sob: :sob:

You can use the commandbar like this:

local medkit = workspace.Medkit for _, part in ipairs(medkit:GetDescendants()) do if part.ClassName == "Part" then part.Unachored == true end end

yeah i never thought of that, ig it wont happen again now though, thanks!

This is where you can leverage the command bar. You can write a script to locate all BasePart descendants of your selected tool and un-anchor them. You’ll typically write them as one-liners, but you can copy-paste code from a script so long as you have no comments:

local Selection = game:GetService("Selection")
local Selected  = Selection:Get()[1]

for _, descendant in Selected:GetDescendants() do
    if descendant:IsA("BasePart") then
        descendant.Anchored = false
    end
end

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.