- What do you want to achieve? Keep it simple and clear!
NPC (Stand) can fly through other players without lagging
- What is the issue? Include screenshots / videos if possible!
https://gyazo.com/5bc2b4eec115abe707890efacc6f3191
- What solutions have you tried so far? Did you look for solutions on the Developer Hub?
using all “AlignPosition” features, but all i got was https://gyazo.com/81d7833bb6a04f63ff44341f72b8e9ca
function StandWeldAndMore(plr,Stand,Script,hrp)
Stand.Parent = plr.Character
Script.Parent = plr.Character
Script.Disabled = false
repeat wait() until plr.Character:FindFirstChild("Stand")
Stand.HumanoidRootPart.CFrame = plr.Character.HumanoidRootPart.CFrame
local part = Instance.new("Part",hrp)
part.Name = "StandWeldPart"
part.Transparency = 1
part.CanCollide = false
part.CanQuery = false
part.Massless = true
part.CanTouch = false
local motor6d = Instance.new("ManualWeld",hrp)
motor6d.Name = "StandWeld"
motor6d.Part0 = hrp
motor6d.Part1 = part
motor6d.C0 = motor6d.Part0.CFrame:ToObjectSpace(motor6d.Part0.CFrame * CFrame.new(1.8, 0, -3))
local att0 = Instance.new("Attachment",Stand.HumanoidRootPart)
local att1 = Instance.new("Attachment",part)
local motor6d = Instance.new("AlignPosition",part)
motor6d.Name = "Test"
motor6d.Attachment0 = att0
motor6d.Attachment1 = att1
motor6d.Responsiveness = 150
local motor6d2 = Instance.new("AlignOrientation",part)
motor6d2.Name = "Test2"
motor6d2.Attachment0 = att0
motor6d2.Attachment1 = att1
motor6d2.Responsiveness = 150
for i, object in ipairs(Stand:GetDescendants()) do
if object:IsA("BasePart") or object:IsA("MeshPart") or object:IsA("Union") then
PhysicsService:SetPartCollisionGroup(object, "Stands")
end
end
for i, object in ipairs(plr.Character:GetDescendants()) do
if object:IsA("BasePart") or object:IsA("MeshPart") or object:IsA("Union") then
PhysicsService:SetPartCollisionGroup(object, "Player")
end
end
end
Also the SetNetworkOwner makes it go way more behind the player
https://gyazo.com/da123f792c17ae742608effd43bb2353