I’m trying to check if an instance hierarchy is a part or not.
local Prom = game:GetService("ProximityPromptService")
Prom.PromptTriggered:Connect(function(Prompt, Player)
print(tostring(Prompt))
if Prompt.Parent:IsA("Attachment") then
if Prompt.Parent:GetAttribute("IsDoor") == true then
print(tostring(Prompt:FindFirstAncestorOfClass("BasePart")))
Door[Prompt.Type.Value](Player, Prompt:FindFirstAncestorOfClass("BasePart"))
end
end
end)
Look into CollectionService. You won’t have to use the same script for 48 proximity prompts with that. In fact, thats the sole purpose behind its design
I honestly don’t know. It’s above Instance and it used to be listed in documentation before they decimated the content and quality of Roblox documentation for the third or fourth time. It’s some internal thing I’m sure. As far as scripting goes, the only thing that is derived from it is Instance and all of the things that derive from Instance and etc. Some other things may inherit from it behind the scenes or whatever, I don’t honestly know.
It still works though.