I am very new to welding, and I am trying to make grab moves using weld moves, right now im making a neck grab attack, yet whenever I activate it, after a couple seconds the character sinks: https://gyazo.com/e02e4b34b9ff3928efcb776ffa2b9fb3
Ive tried multiple methods including setting the dummy to massless, turning off cancollide to most of his limbs, and ive even tried using collisiongroups but it just doesnt seem to work, anybody know what to do?
--local script
local Player = game:GetService("Players").LocalPlayer
local Character = Player.Character or Player.CharacterAdded:Wait()
local Hum = Character:WaitForChild("Humanoid")
local rp = game:GetService("ReplicatedStorage")
local Grab = rp:WaitForChild("RemoteGrab2")
local UIS = game:GetService("UserInputService")
UIS.InputBegan:Connect(function(input, IsTyping)
if IsTyping then
return
end
if input.UserInputType == Enum.UserInputType.MouseButton1 then
Grab:FireServer()
end
end)
-- Server Script
local rp = game:GetService("ReplicatedStorage")
local Grab2 = rp:WaitForChild("RemoteGrab2")
local Debris = game:GetService("Debris")
local debounce = false
local PhysicsService = game:GetService('PhysicsService')
pcall(PhysicsService.RemoveCollisionGroup, PhysicsService, 'PlayerGroup')
pcall(PhysicsService.RemoveCollisionGroup, PhysicsService, 'Dummy')
PhysicsService:CreateCollisionGroup("PlayerGroup")
PhysicsService:CreateCollisionGroup("Dummy")
Grab2.OnServerEvent:Connect(function(player)
local Char = player.Character or player.CharacterAdded:Wait()
local Hum = Char:WaitForChild("Humanoid")
local Humrp = Char:WaitForChild("HumanoidRootPart")
local RightH = Char
local Folder = Instance.new("Folder", Char)
Folder.Name = player.Name.." Melee"
Debris:AddItem(Folder, .5)
local Hitbox = script:WaitForChild("Hitbox"):Clone()
Hitbox.CFrame = Humrp.CFrame
Hitbox.Parent = Folder
local Hweld = Instance.new("ManualWeld")
Hweld.Part0 = Hitbox --thing we are trying to weld
Hweld.Part1 = Char["HumanoidRootPart"] --What we are welding to
Hweld.C0 = CFrame.new(0, -4, 0) + Vector3.new(0,Char["HumanoidRootPart"].Size.Y/2,0)
Hweld.C0 = CFrame.new(0,0,1.5) * CFrame.Angles(math.rad(0),math.rad(0),math.rad(0))
Hweld.Parent = Hweld.Part0
Hitbox.Touched:Connect(function(Hit)
if Hit:IsA("BasePart") then
if not Hit:IsDescendantOf(Char) then
local EChar = Hit.Parent:FindFirstChild("Character")
local EUpperTorso = Hit.Parent:FindFirstChild("Head")
local EHum = Hit.Parent:FindFirstChild("Humanoid")
local EHumrp = Hit.Parent:FindFirstChild("HumanoidRootPart")
if EHum and EHumrp then
if debounce == false then
debounce = true
PhysicsService:CollisionGroupSetCollidable('PlayerGroup', 'Dummy', false)
PhysicsService:SetPartCollisionGroup(Humrp, 'PlayerGroup')
PhysicsService:SetPartCollisionGroup(EHumrp, 'Dummy')
local Animator = Char.Humanoid:FindFirstChildWhichIsA("Animator")
local Track = Instance.new("Animation")
Track.AnimationId = "rbxassetid://8837123515"
local Anim = Animator:LoadAnimation(Track)
Hum.WalkSpeed = 0
Anim:Play()
local EWeld = Instance.new("ManualWeld")
EWeld.Part0 = EUpperTorso --thing we are trying to weld
EWeld.Part1 = Char["RightHand"] --What we are welding to
EWeld.C0 = CFrame.new(0, 0, 0) + Vector3.new(0,Char["RightHand"].Size.Y/2,0)
EWeld.C0 = CFrame.new(0,-.5,0) * CFrame.Angles(-40, math.rad(180), 0)
EWeld.Parent = EWeld.Part0
PhysicsService:CollisionGroupSetCollidable('PlayerGroup', 'Dummy', false)
wait(5)
debounce = false
print("debounce now false")
end
end
end
end
end)
end)