Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

My character sinks into the ground. Any fix?

So I tried making a detain and every time I try to jump / sometimes when I walk I just sink into the ground. The server code

local remote = game.ReplicatedStorage.DetainEvent
remote.OnServerEvent:Connect(function(plr, target)
	if plr.Backpack:FindFirstChild("Detain") or plr.Character:FindFirstChild("Detain") then
		local Target = game.Players:GetPlayerFromCharacter(target)
		if Target.Character:FindFirstChild("Detain") then
			Target.Character.Detain:Destroy()
			for i,v in pairs(TargetParts) do
				if v:IsA("Part") then
					v.Massless = false
				end
			end
		else
			local Weld = Instance.new("Weld")
			TargetParts = Target.Character:GetChildren()
		Weld.Name = "Detain"
		Target.Character.Torso.CFrame = plr.Character.Torso.CFrame * CFrame.new(0,0.5,-5)
		Weld.Part0 = plr.Character.Torso
		Weld.Part1 = Target.Character.Torso
		Weld.C0 = plr.Character.Torso.CFrame:Inverse()
		Weld.C1 = Target.Character.Torso.CFrame:Inverse()
		Target.Character.HumanoidRootPart.Massless = true
			Weld.Parent = Target.Character
			for i,v in pairs(TargetParts) do
				if v:IsA("Part") then
					v.Massless = true
				end
			end
		end
		
		
	end
end)

1 answer

✓ Accepted answer

In Humanoid, there is a property named Hip Height. It might be got to do with that is set too small.

2 comments

0

THANK YOU SOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO MUCH

0

Np.

This discussion is preserved as it was. New answers, comments, and votes are closed.