Welded part is colliding with player

My welded part is colliding with player for some reason. CanCollide, Canquery, CanTouch are all turned off too.

Code:

local player = game.Players.LocalPlayer

repeat wait(1) until player.Character

wait(4)

local weld = Instance.new("Weld")
local leftLowerLeg = player.Character:FindFirstChild("LeftLowerLeg")
local clone = game.ReplicatedStorage.Killzone:Clone()
clone.Parent = player.Character
clone.CFrame = leftLowerLeg.CFrame * CFrame.new(0, 5, 0)

weld.Part0 = clone
weld.Part1 = leftLowerLeg
weld.Parent = leftLowerLeg

Picture:

1 Like

Try turning Massless property to true. I suppose its what causing the issue.
Add clone.Massless=true

2 Likes

I dont get that issue when using your script, and maybe you dont want to weld the part to the Foot, would be better if you weld it to HRP

The properties of the Killzone part I made are
CanCollide false
CanQuery true
CanTouch true
Anchored false
Massless true

Thats another fix, though turning the massless property of the clone part would fix it, when the part is added to the players character and welded to the left lower leg, I suppose its clone parts mass thats causing the issue.

1 Like

Yeah, thats the most probable issue, that the part has Mass. Indeed that when welding parts to the character Massless should be on, or character will become fat by adding more mass into them xD

1 Like

I fixed the problem with the movement being weird and the part colliding with the ground/other parts. My current issue right now is that I’m unable to position the part to be at the player’s leg. How would I go about doing this?

Current code:

local player = game.Players.LocalPlayer

repeat wait(1) until player.Character

wait(4)

local weld = Instance.new("Weld")
local hrp = player.Character:FindFirstChild("HumanoidRootPart")
local clone = game.ReplicatedStorage.Killzone:Clone()
clone.Parent = workspace

weld.Part0 = clone
weld.Part1 = hrp

clone.CFrame = hrp.CFrame * CFrame.new(0, -2, 0)

weld.Parent = hrp

Use the earlier code, don’t change the Part1 to HumanoidRootPart, but add clone.Massless=true, trust me, it will work.

local player = game.Players.LocalPlayer

repeat wait(1) until player.Character

wait(4)

local weld = Instance.new("Weld")
local leftLowerLeg = player.Character:FindFirstChild("LeftLowerLeg")
local clone = game.ReplicatedStorage.Killzone:Clone()
clone.Parent = player.Character
clone.CFrame = leftLowerLeg.CFrame * CFrame.new(0, 5, 0)
clone.Massless = true --this is where you set massless to true.

weld.Part0 = clone
weld.Part1 = leftLowerLeg
weld.Parent = leftLowerLeg

I didnt mean to change the CFrame of the Killzone part to the HRP. Just set it to the foot part the CFrame. But, the weld change it to HRP or Torso, otherwise if its welded to the foot, it will move weirdly, cause its following the foot, unless thats what you want, that the kill zone to move welded to the foot.

I copy and pasted your code and it didn’t work.

If you want the Part to be welded to the foot, HumanoidRootPart, or whatever then that’s fine, but if you want it to weld at an offset you need to set the Weld C0 and C1 properties for the offset.

1 Like

The code @CelestialHonour provided works. But, still having the issue that the part will follow the foot, theres some question I would like to ask.

First, what is the goal? Why you are doing this on client side? you called that part Killzone? what you mean? its for killing other players? that wont work if its client sided.

Mainly, the goal of your approach. Why weld it to the leg? why client side? what you expect this Killzone part to do?

Thanks! Your solution worked. For any of those who experience a situation similar to mine here is my code.

local player = game.Players.LocalPlayer

repeat wait(1) until player.Character

wait(4)

local weld = Instance.new("Weld")
local HRP = player.Character:FindFirstChild("HumanoidRootPart")
local clone = game.ReplicatedStorage.Killzone:Clone()
clone.Parent = player.Character
clone.CFrame = HRP.CFrame

weld.Part0 = clone
weld.Part1 = HRP
weld.C0 = clone.CFrame
weld.C1 = HRP.CFrame * CFrame.new(0, -2.75, 0)
weld.Parent = HRP
1 Like

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