--//Functions

function CheckName(Object)
	local NameFound = false
	for _,Name in pairs({"LeftFoot", "LeftHand", "LeftLowerArm", "LeftLowerLeg", "LeftUpperArm", "LeftUpperLeg", "LowerTorso", "RightFoot", "RightHand", "RightLowerArm", "RightLowerLeg", "RightUpperArm", "RightUpperLeg", "UpperTorso", "Head"}) do
		if string.lower(Object.Name) == string.lower(Name) then
			NameFound = true
		end
	end
	if NameFound then
		return true
	end
end

function AddWeld(Target, Object)
	if Target and Object then
		local Weld = Instance.new("WeldConstraint", Object)
		Weld.Part0 = Target
		Weld.Part1 = Object
	end
end

function LockPlayer(Player, Value)
	local Humanoid = Player.Character:FindFirstChildOfClass("Humanoid")
	if Player and Humanoid then
		if Value == true then
			Humanoid.PlatformStand = true
			Player.Character:FindFirstChild("HumanoidRootPart").Anchored = true
			wait(0.5)
		elseif Value == false then
			Humanoid.PlatformStand = false
			Player.Character:FindFirstChild("HumanoidRootPart").Anchored = false
		end
	end
end

